|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.dataselectors.filters.AbstractFilterItemSimpleListBase
public abstract class AbstractFilterItemSimpleListBase
This class is abstract implementation to manage a list of test nodes that are created from a filter item. A child class must decide how to populate the list.
Field Summary | |
---|---|
protected FilterItemListInterface |
_filterItemList
The filter item list. |
protected java.util.List |
_filterTestNodeList
The list of test nodes. |
Constructor Summary | |
---|---|
AbstractFilterItemSimpleListBase(FilterItemListInterface filterItemList)
Constructor for AbstractFilterItemSimpleListBase. |
Method Summary | |
---|---|
void |
add(int index,
java.lang.Object element)
Adds the specified element at the specified position in the list by updating the underlying tree. |
boolean |
add(java.lang.Object element)
Ensures that this collection contains the specified element (optional operation). |
boolean |
addAll(java.util.Collection collection)
Adds all of the elements in the specified collection to this collection (optional operation). |
boolean |
addAll(int index,
java.util.Collection collection)
Adds all items from the given collection to this list at the specified index. |
protected void |
addTestNodeAt(int index,
FilterLogicTestNodeInterface testNode)
Adds the test node to the list at the desired position. |
void |
clear()
Removes all of the elements from this collection (optional operation). |
abstract boolean |
commitChanges()
Commit any changes to the filter model and apply them to the native model. |
boolean |
contains(java.lang.Object element)
|
boolean |
containsAll(java.util.Collection collection)
Returns true if this collection contains all of the elements in the specified collection. |
boolean |
equals(java.lang.Object object)
Compares the specified object with this collection for equality. |
java.lang.Object |
get(int index)
Returns the object at the specified index in the list. |
FilterItemListInterface |
getFilterItemList()
The list of source items in the filter model. |
abstract java.lang.Object |
getRootFilterObject()
Returns the root filter object in the native model representing the completed filter selection. |
protected java.lang.Object |
getTestNodeAt(int index)
Returns the node at the specified index. |
int |
hashCode()
|
int |
indexOf(java.lang.Object object)
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. |
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
int |
lastIndexOf(java.lang.Object object)
Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element. |
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int index)
|
java.lang.Object |
remove(int index)
Removes the object at the specified index from the list. |
boolean |
remove(java.lang.Object object)
Removes a single instance of the specified element from this collection, if it is present (optional operation). |
boolean |
removeAll(java.util.Collection collection)
Removes all this collection's elements that are also contained in the specified collection (optional operation). |
protected java.lang.Object |
removeTestNodeAt(int index)
Removes the node at the specified index of the list. |
boolean |
retainAll(java.util.Collection p1)
Retains only the elements in this collection that are contained in the specified collection (optional operation). |
java.lang.Object |
set(int index,
java.lang.Object element)
Inserts the specified element at the specified position in this list by updating the underlying tree. |
protected java.lang.Object |
setTestNodeAt(int index,
FilterLogicTestNodeInterface testNode)
Assigns the test node to the list at the specified position. |
int |
size()
|
java.util.List |
subList(int startIndex,
int endIndex)
This method would produce a sublist of this list if it were supported. |
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] p1)
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. |
Field Detail |
---|
protected java.util.List _filterTestNodeList
protected FilterItemListInterface _filterItemList
Constructor Detail |
---|
public AbstractFilterItemSimpleListBase(FilterItemListInterface filterItemList)
filterItemList
- the source list of filter itemsMethod Detail |
---|
public abstract boolean commitChanges()
commitChanges
in interface SimpleLogicListInterface
public abstract java.lang.Object getRootFilterObject()
SimpleLogicListInterface
commitChanges()
method to construct the native filter.
getRootFilterObject
in interface SimpleLogicListInterface
java.lang.UnsupportedOperationException
- if this is not the casepublic FilterItemListInterface getFilterItemList()
getFilterItemList
in interface SimpleLogicListInterface
protected java.lang.Object setTestNodeAt(int index, FilterLogicTestNodeInterface testNode)
index
- the index in the list of nodestestNode
- the node to set on the list
protected void addTestNodeAt(int index, FilterLogicTestNodeInterface testNode)
index
- the index in the list of nodestestNode
- the node to add to the listprotected java.lang.Object removeTestNodeAt(int index)
index
- the index of the node to remove
protected java.lang.Object getTestNodeAt(int index)
index
- the index of the node
public java.lang.Object set(int index, java.lang.Object element)
set
in interface java.util.List
index
- the index for the elementelement
- the element to assign to the list
List.set(int, Object)
public void add(int index, java.lang.Object element)
add
in interface java.util.List
index
- the index for the elementelement
- the element to add to the listList.add(int, Object)
public java.lang.Object remove(int index)
remove
in interface java.util.List
index
- the index of the object
public java.lang.Object get(int index)
get
in interface java.util.List
index
- the index of the object
public boolean addAll(int index, java.util.Collection collection)
addAll
in interface java.util.List
index
- the index in this list to begin inserting elements atcollection
- the collection of elements to add to this list
public boolean containsAll(java.util.Collection collection)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.List
collection
- the collection to be checked for containment in this collection.
java.lang.NullPointerException
- if the specified collection is
null.Collection.containsAll(Collection)
public boolean removeAll(java.util.Collection collection)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.List
collection
- the elements to be removed from this collection.
java.lang.NullPointerException
- if the specified collection is
null.Collection.remove(Object)
,
Collection.contains(Object)
,
Collection.removeAll(Collection)
public boolean remove(java.lang.Object object)
remove
in interface java.util.Collection
remove
in interface java.util.List
object
- the element to be removed from this collection, if present.
Collection.remove(Object)
public boolean add(java.lang.Object element)
Collections that support this operation may place limitations on what elements may be added to this collection. In particular, some collections will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. Collection classes should clearly specify in their documentation any restrictions on what elements may be added.
If a collection refuses to add a particular element for any reason other than that it already contains the element, it must throw an exception (rather than returning false). This preserves the invariant that a collection always contains the specified element after this call returns.
add
in interface java.util.Collection
add
in interface java.util.List
element
- the element whose presence in this collection is to be ensured.
Collection.add(Object)
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
Collection.clear()
public boolean contains(java.lang.Object element)
contains
in interface java.util.Collection
contains
in interface java.util.List
element
- the element to search for
Collection.contains(Object)
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.List
Collection.iterator()
public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
List.listIterator()
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
index
- the initial position for the new iterator
List.listIterator(int)
public boolean retainAll(java.util.Collection p1)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.List
c
- elements to be retained in this collection.
java.lang.NullPointerException
- if the specified collection is
null.remove(Object)
,
contains(Object)
,
Collection.retainAll(Collection)
public boolean addAll(java.util.Collection collection)
addAll
in interface java.util.Collection
addAll
in interface java.util.List
c
- elements to be inserted into this collection.
add(Object)
,
Collection.addAll(Collection)
public java.util.List subList(int startIndex, int endIndex)
subList
in interface java.util.List
fromIndex
- low endpoint (inclusive) of the subList.toIndex
- high endpoint (exclusive) of the subList.
java.lang.UnsupportedOperationException
- because the method is
not supported by this list at this time.public int indexOf(java.lang.Object object)
indexOf
in interface java.util.List
o
- element to search for.
List.indexOf(Object)
public int lastIndexOf(java.lang.Object object)
lastIndexOf
in interface java.util.List
o
- element to search for.
public boolean equals(java.lang.Object object)
equals
in interface java.util.Collection
equals
in interface java.util.List
equals
in class java.lang.Object
o
- Object to be compared for equality with this collection.
Object.equals(Object)
,
Set.equals(Object)
,
List.equals(Object)
,
Collection.equals(Object)
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.List
hashCode
in class java.lang.Object
Object.hashCode()
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.List
Collection.isEmpty()
public int size()
size
in interface java.util.Collection
size
in interface java.util.List
Collection.size()
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.List
Collection.toArray()
public java.lang.Object[] toArray(java.lang.Object[] p1)
toArray
in interface java.util.Collection
toArray
in interface java.util.List
a
- the array into which the elements of this collection are to be
stored, if it is big enough; otherwise, a new array of the same
runtime type is allocated for this purpose.
java.lang.ArrayStoreException
- the runtime type of the specified array is
not a supertype of the runtime type of every element in this
collection.
java.lang.NullPointerException
- if the specified array is null.Collection.toArray(Object[])
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |