|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.io.SymbolExtractor
public class SymbolExtractor
This class enables you to extract elements (symbols) from a given
String
similar to a StringTokenizer
.
The class has some special functionalities that are not given by a
StringTokenizer
:
null
. (In this case
the characters of the String
are returned.)
Constructor Summary | |
---|---|
SymbolExtractor(String delim)
Creates a new SymbolExtractor using delim as
delimiter. |
|
SymbolExtractor(String string,
String delim)
Creates a new SymbolExtractor using delim as
delimiter and string as the String to be parsed. |
Method Summary | |
---|---|
int |
countElements()
Counts the number of elements (symbols) that can be received initially. |
static int |
filter(String inFile,
char ignore,
AlphabetContainer con,
int minLength,
String outFile)
This method allows the user to filter the content of a File using a given AlphabetContainer and a
minimal sequence length. |
boolean |
hasMoreElements()
|
String |
nextElement()
|
void |
setStringToBeParsed(String string)
Sets a new String to be parsed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SymbolExtractor(String delim)
SymbolExtractor
using delim
as
delimiter. Before invoking other methods one has to use
setStringToBeParsed(String)
.
delim
- the delimitersetStringToBeParsed(String)
,
SymbolExtractor(String, String)
public SymbolExtractor(String string, String delim)
SymbolExtractor
using delim
as
delimiter and string
as the String
to be parsed.
string
- the String
to be parseddelim
- the delimiterMethod Detail |
---|
public void setStringToBeParsed(String string)
String
to be parsed.
string
- the String
to be parsedpublic int countElements()
public boolean hasMoreElements()
hasMoreElements
in interface Enumeration<String>
public String nextElement()
nextElement
in interface Enumeration<String>
public static int filter(String inFile, char ignore, AlphabetContainer con, int minLength, String outFile) throws IOException
File
using a given AlphabetContainer
and a
minimal sequence length. This method is useful to filter, for instance,
data sets with ambiguous nucleotides and/or short sequences. Lines that
can not be parsed with respect to the AlphabetContainer
will be
masked by the character ignore
.
inFile
- the path/name of the input File
ignore
- the char for comment linescon
- the AlphabetContainer
minLength
- the minimal length of a sequence in the output
File
outFile
- the path/name of output File
File
IOException
- if something with the handling of the File
s
went wrong
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |