|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.filter.StringableFilterSequence
An ordered collection of filter objects
similar to a
that is itself a filter
representing the ordered application of the list of filters.List
| Field Summary | |
protected List |
filters
The underlying list used for storage of filters. |
| Constructor Summary | |
StringableFilterSequence()
Constructs a sequence using the default underlying linear data structure. |
|
StringableFilterSequence(List l)
Constructs a sequence using the given underlying linear data structure. |
|
| Method Summary | |
void |
add(int index,
StringableFilter f)
Inserts the given filter at the given index in this sequence. |
boolean |
add(StringableFilter f)
Appends the given filter to the end of this sequence. |
void |
clear()
Removes all of the filters from this sequence. |
boolean |
contains(StringableFilter f)
Returns true if the given filter
is contained in this sequence,
or false if it is not. |
boolean |
containsAll(Collection c)
Returns true if this sequence contains
all of the elements of the specified collection. |
boolean |
equals(StringableFilterSequence sequence)
Returns true if the given sequence
is equal to this sequence,
and false if it is not. |
Stringable |
filterStringable(Stringable obj)
Applies the filters in this sequence in order. |
StringableFilter |
get(int index)
Returns the filter at the given index in this sequence. |
int |
hashCode()
Returns a hash code value for this sequence. |
int |
indexOf(StringableFilter f)
Returns the index in this sequence of the first occurence of the given filter, or -1 if this sequence does not contain this filter. |
boolean |
isEmpty()
Returns true if this sequence is empty,
and false if it is not. |
Iterator |
iterator()
Returns an iterator over the filters in this sequence in order. |
int |
lastIndexOf(StringableFilter f)
Returns the index in this sequence of the last occurrence of the given filter, or -1 if this list does not contain this filter. |
ListIterator |
listIterator()
Returns a list iterator over the filters in this sequence in order. |
ListIterator |
listIterator(int index)
Returns a list iterator over the filters in this sequence in order, starting at the given index. |
StringableFilter |
remove(int index)
Removes the filter at the given index of the sequence. |
boolean |
remove(StringableFilter f)
Removes the first occurrence of the given filter in this sequence, and returns true,
or returns false
if this sequence does not contain the filter. |
StringableFilter |
set(int index,
StringableFilter f)
Replaces the filter at the given index in this sequence with the given filter. |
int |
size()
Returns the number of filters in this sequence. |
StringableFilterSequence |
subList(int fromIndex,
int toIndex)
Returns a sequence of filters containing the filters in this sequence from the given starting index to the given ending index, exclusive. |
StringableFilter[] |
toArray()
Returns an array containing the filters in this sequence in order. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected List filters
| Constructor Detail |
public StringableFilterSequence()
StringableFilterSequence(List)public StringableFilterSequence(List l)
null,
the default structure is used.
l - the data structure to be usedStringableFilterSequence()| Method Detail |
public Stringable filterStringable(Stringable obj)
throws FilterException
filterStringable in interface StringableFilterobj - the object to be filtered
FilterException - if the object does not meet the
criteria for the filter, or cannot be filteredStringableFilter
public void add(int index,
StringableFilter f)
add(StringableFilter)public boolean add(StringableFilter f)
add(int, StringableFilter)public void clear()
public boolean contains(StringableFilter f)
true if the given filter
is contained in this sequence,
or false if it is not.
containsAll(Collection)public boolean containsAll(Collection c)
true if this sequence contains
all of the elements of the specified collection.
contains(StringableFilter)public boolean equals(StringableFilterSequence sequence)
true if the given sequence
is equal to this sequence,
and false if it is not.
public StringableFilter get(int index)
public int hashCode()
public int indexOf(StringableFilter f)
lastIndexOf(StringableFilter)public boolean isEmpty()
true if this sequence is empty,
and false if it is not.
size()public Iterator iterator()
listIterator(),
listIterator(int)public int lastIndexOf(StringableFilter f)
indexOf(StringableFilter)public ListIterator listIterator()
listIterator(int),
iterator()public ListIterator listIterator(int index)
listIterator(),
iterator()public StringableFilter remove(int index)
remove(StringableFilter)public boolean remove(StringableFilter f)
true,
or returns false
if this sequence does not contain the filter.
remove(int)
public StringableFilter set(int index,
StringableFilter f)
public int size()
isEmpty()
public StringableFilterSequence subList(int fromIndex,
int toIndex)
listIterator(int)public StringableFilter[] toArray()
iterator(),
listIterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||