net.sourceforge.sstringsearch
Class StringSearchFactory

java.lang.Object
  extended by net.sourceforge.sstringsearch.StringSearchFactory

public class StringSearchFactory
extends Object

Project: sstringsearch
File: StringSearchFactory.java
Class: StringSearchFactory
Created: 7. mai. 2008

Description:

The main source for obtaining objects for doing both search and search& replace.

Version:
$Revision$
Author:
Kristian Andersen Email

Constructor Summary
StringSearchFactory()
           
 
Method Summary
static Replacer getReplacer()
          Returns a casesensitive Replacer, capable of doing search and replace.
static Replacer getReplacer(boolean caseSensitive)
          Returns a Replacer, capable of doing search and replace.
static Searcher getSearcher()
          Returns a casesensitive Searcher, capable of doing stringsearch.
static Searcher getSearcher(boolean caseSensitive)
          Returns a Searcher, capable of doing stringsearch.
static Replacer loadReplacer(InputStream inputStream)
          Loads a serialized Replacer from InputStream.
static Searcher loadSearcher(InputStream inputStream)
          Loads a serialized Searcher from InputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringSearchFactory

public StringSearchFactory()
Method Detail

getSearcher

public static Searcher getSearcher()
Returns a casesensitive Searcher, capable of doing stringsearch.

Returns:
A Searcher.

getSearcher

public static Searcher getSearcher(boolean caseSensitive)
Returns a Searcher, capable of doing stringsearch.

Parameters:
caseSensitive - Decides if the Searcher is case sensitive.
Returns:
A Searcher.

getReplacer

public static Replacer getReplacer()
Returns a casesensitive Replacer, capable of doing search and replace.

Returns:
A Replacer.

getReplacer

public static Replacer getReplacer(boolean caseSensitive)
Returns a Replacer, capable of doing search and replace.

Parameters:
caseSensitive - Decides if the Replacer is case sensitive.
Returns:
A Replacer.

loadSearcher

public static Searcher loadSearcher(InputStream inputStream)
                             throws IOException,
                                    ClassNotFoundException
Loads a serialized Searcher from InputStream.

Parameters:
inputStream - The InputStream to read from.
Returns:
A deserialized A Searcher
Throws:
IOException - of anything goes wrong reading the serialized object.
ClassNotFoundException - Will probably never happen :-)

loadReplacer

public static Replacer loadReplacer(InputStream inputStream)
                             throws IOException,
                                    ClassNotFoundException
Loads a serialized Replacer from InputStream.

Parameters:
inputStream - The InputStream to read from.
Returns:
A deserialized A Replacer
Throws:
IOException - of anything goes wrong reading the serialized object.
ClassNotFoundException - Will probably never happen :-)


Copyright © 2005-2009 Kristian Andersen. All Rights Reserved.