|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.engine.IlrDefaultCollector
public class IlrDefaultCollector
This class defines the collector used by a collect
condition
for which a collector is not provided.
Field Summary | |
---|---|
protected Vector |
elements
This vector contains the elements of the collection. |
Constructor Summary | |
---|---|
IlrDefaultCollector()
Constructs a collector with no arguments. |
Method Summary | |
---|---|
boolean |
add(Object o)
Ensures that this collection contains the specified element. |
boolean |
addAll(Collection c)
Adds all of the elements in the specified collection to this collection. |
void |
addElement(Object element)
Adds the specified element to the vector. |
void |
clear()
Removes all of the elements from this collection. |
boolean |
contains(Object element)
Tests if the collection contains some specific object using the equals method. |
boolean |
containsAll(Collection c)
Returns true if this collection contains all the elements
in the specified collection. |
Enumeration |
copyElements()
Creates an enumeration to visit all the elements of the collection. |
Enumeration |
elements()
Creates an enumeration to visit all the elements of the collection. |
boolean |
equals(Object o)
Compares the specified object with this collection for equality. |
int |
hashCode()
Returns the hash code value for this collection. |
boolean |
isEmpty()
Tests if the collection is empty. |
Iterator |
iterator()
Returns an iterator over the elements in this collection. |
boolean |
remove(Object o)
Removes the occurrence of the specified element in the collected object. |
boolean |
removeAll(Collection c)
Removes all of the elements from this collection that are contained in the specified collection. |
void |
removeElement(Object element)
Removes the specified element from the vector. |
boolean |
retainAll(Collection c)
Retains only the elements in this collection that are contained in the specified collection. |
int |
size()
Gets the number of elements currently in this collection. |
Object[] |
toArray()
Returns an array containing all of the collected elements. |
Object[] |
toArray(Object[] a)
Returns an array containing all of the collected elements whose runtime type is that of the specified array. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ilog.rules.engine.IlrCollection |
---|
updateElement |
Field Detail |
---|
protected Vector elements
This vector contains the elements of the collection.
Constructor Detail |
---|
public IlrDefaultCollector()
Constructs a collector with no arguments.
Method Detail |
---|
public final int size()
Gets the number of elements currently in this collection.
size
in interface Collection
public final boolean isEmpty()
Tests if the collection is empty.
isEmpty
in interface Collection
true
if the collection contains no objects,
and false
if the collection has at least one object.public final boolean contains(Object element)
Tests if the collection contains some specific object using the
equals
method.
contains
in interface Collection
element
- An object.
true
if the specified object is a member of
this collection, and false
otherwise.public final Enumeration elements()
Creates an enumeration to visit all the elements of the collection. This method does not save (or copy) the elements. During the visit, any changes to the collection may impact the enumeration.
public final Enumeration copyElements()
Creates an enumeration to visit all the elements of the collection. This method creates a new holder containing the elements and returns an enumeration of that holder. As the elements are saved in a specific data structure, the returned enumeration will not be impacted by any changes on the collection.
public void addElement(Object element)
Adds the specified element to the vector. The element is added at the end of the vector without any membership testing.
addElement
in interface IlrCollection
element
- The element to add.public void removeElement(Object element)
Removes the specified element from the vector. If the vector does not contain the element, no element is removed.
removeElement
in interface IlrCollection
element
- The element to removed.public boolean add(Object o)
true
if this collection changed as a result of the
call. (It returns false
if this collection does not permit
duplicates and already contains the specified element.)
add
in interface Collection
o
- The element whose presence in this collection is to be ensured.
true
if this collection changed as a result of the
call.public boolean addAll(Collection c)
addAll
in interface Collection
c
- The elements to be inserted into this collection.
true
if this collection changed as a result of
the call.public void clear()
clear
in interface Collection
public boolean containsAll(Collection c)
true
if this collection contains all the elements
in the specified collection.
containsAll
in interface Collection
c
- The collection to be checked for containment in this collection.
true
if this collection contains all of the
elements in the specified collection.public boolean equals(Object o)
equals
in interface Collection
equals
in class Object
o
- The object to be compared for equality with this collection.
true
if the specified object is equal to this
collection.public int hashCode()
hashCode
in interface Collection
hashCode
in class Object
public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
public boolean remove(Object o)
true
if the specified object was contained
in this collection.
remove
in interface Collection
o
- The object to be removed from this collection, if present.
true
if the collection contained the specified
element.public boolean removeAll(Collection c)
removeAll
in interface Collection
c
- The collection that contains all the objects to be removed.
true
if this collection changed as a result of
the call.public boolean retainAll(Collection c)
retainAll
in interface Collection
c
- The collection that contains all the objects to be retained.
true
if this collection changed as a result of
the call.public Object[] toArray()
toArray
in interface Collection
public Object[] toArray(Object[] a)
toArray
in interface Collection
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.
|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |