|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList com.endeca.navigation.analytics.FilterAnd
public class FilterAnd
A FilterAnd
is a Filter
implementing a Boolean
n-way AND
operation. The filter evaluates to true
for a given record
if all of its child Filters evaluate to true
for that record.
This type of filter provides a List interface, where the List elements
represent child Filter
operations.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
FilterAnd()
Creates a new FilterAnd with no sub-filters (no Filter elements). |
Method Summary | |
---|---|
void |
add(int index,
Object obj)
Inserts a Filter object at position index . |
Object |
get(int index)
Gets the Filter object at position index . |
Object |
remove(int index)
Removes the Filter element at the specified position in this FilterAnd . |
Object |
set(int index,
Object obj)
Replaces the Filter object at position index
with the the Filter object specified by obj . |
int |
size()
Returns the number of Filter objects in this FilterAnd . |
String |
toString()
Returns the string form of this FilterAnd . |
String |
toWire()
Returns the wire form of this FilterAnd . |
void |
validateSyntax()
Validates the syntax of this FilterAnd . |
Methods inherited from class java.util.AbstractList |
---|
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, subList, toArray, toArray |
Constructor Detail |
---|
public FilterAnd()
FilterAnd
with no sub-filters (no Filter
elements).
Method Detail |
---|
public Object get(int index)
Filter
object at position index
.
get
in interface List
get
in class AbstractList
index
- offset of the desired Filter
object.
Filter
object at position index
.
IndexOutOfBoundsException
- if index
is out of range.public int size()
Filter
objects in this FilterAnd
.
size
in interface Collection
size
in interface List
size
in class AbstractCollection
Filter
objects in the list.public Object set(int index, Object obj)
Filter
object at position index
with the the Filter
object specified by obj
.
set
in interface List
set
in class AbstractList
index
- offset of the Filter
object to replace.obj
- the Filter
object to store.
Filter
object previously at position index
.
IndexOutOfBoundsException
- if index
is out of range.
IllegalArgumentException
- if obj
is not a Filter
.public void add(int index, Object obj)
Filter
object at position index
.
Shifts the Filter
element currently at that position (if any) and
any subsequent Filter
elements to the right (adds one to their indices).
add
in interface List
add
in class AbstractList
index
- offset at which the Filter
is to be inserted.obj
- the Filter
to be inserted.
IndexOutOfBoundsException
- if index
is out of range.
IllegalArgumentException
- if obj
is not a Filter
.public Object remove(int index)
Filter
element at the specified position in this FilterAnd
.
Shifts any subsequent Filter
elements to the left (subtracts one from
their indices). Returns the Filter
that was removed from the list.
remove
in interface List
remove
in class AbstractList
index
- offset of the Filter
to be removed.
Filter
element previously at position index
.
IndexOutOfBoundsException
- if index
is out of range.public String toString()
FilterAnd
. These are of the format:
(filter1 AND filter2 ...)where each filter is the string form of a
Filter
.
toString
in interface QueryNode
toString
in class AbstractCollection
FilterAnd
in the specified format.public String toWire()
FilterAnd
. This method is not
intended for public use because the wire format is subject to change.
toWire
in interface QueryNode
FilterAnd
.public void validateSyntax() throws SyntaxException
FilterAnd
.
A FilterAnd
is valid if the number of
sub-filters (Filter
elements) is greater than
zero and each sub-filter is itself valid.
validateSyntax
in interface QueryNode
SyntaxException
- if the syntax requirements are not satisfied.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |