public class FilterChain
extends java.lang.Object
implements java.lang.Cloneable
FilterChain
class provides the container for a filter chain.Constructor and Description |
---|
FilterChain()
Constructs a
FilterChain object and resets it. |
Modifier and Type | Method and Description |
---|---|
void |
addFilter(AFilter filter)
Adds the specified filter to the filter chain.
|
FilterChain |
clone()
Clones (deep copy) the current filter chain.
|
AFilter |
getFilter(int n)
Returns the n-th filter from the filter chain.
|
void |
plainTextLoad(org.sm.smtools.util.TextFileParser tfp)
Loads the filter chain from a plain-text file.
|
void |
plainTextSave(org.sm.smtools.util.TextFileWriter tfw)
Saves the filter chain to a plain-text file.
|
void |
reset()
Resets the filter chain.
|
int |
size()
Returns the number of filters in the filter chain.
|
void |
streamLoad(java.io.DataInputStream dataInputStream)
Loads the filter chain from a file as a stream.
|
void |
streamSave(java.io.DataOutputStream dataOutputStream)
Saves the filter chain to a file as a stream.
|
public void addFilter(AFilter filter)
filter
- the filter to add to the filter chainpublic FilterChain clone()
clone
in class java.lang.Object
public AFilter getFilter(int n)
Filter starts numbering at 0.
n
- the index of the filter to returnpublic void plainTextLoad(org.sm.smtools.util.TextFileParser tfp) throws org.sm.smtools.exceptions.FileParseException
tfp
- a reference to the file parserorg.sm.smtools.exceptions.FileParseException
- in case a read error occurspublic void plainTextSave(org.sm.smtools.util.TextFileWriter tfw) throws org.sm.smtools.exceptions.FileWriteException
tfw
- a reference to the file writerorg.sm.smtools.exceptions.FileWriteException
- in case a write error occurspublic void reset()
public int size()
public void streamLoad(java.io.DataInputStream dataInputStream) throws java.io.IOException
dataInputStream
- a data inputstreamjava.io.IOException
- in case a parse error occurspublic void streamSave(java.io.DataOutputStream dataOutputStream) throws java.io.IOException
dataOutputStream
- a data outputstreamjava.io.IOException
- in case a write error occurs