|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.reteoo.FactHandleList
Specialised array of FactHandle
s intended to be keyed by a Declaration
s
index. The list only ever contains as many elements as necessary to hold a handle at the
position specified by the largest Declaration index. As a result, the list will neccessarily
contain NULL
values.
This class exists purely for performance reasons and as such, many assumptions have been
made regarding behaviour based on know usage. Therefore, this class should in no way be
considerd a general purpose data structure. Hence it resides in this package and not a more
generic "util" package.
Field Summary | |
(package private) static FactHandleList |
EMPTY_LIST
Empty list for testing purposes only. |
Constructor Summary | |
FactHandleList(FactHandleList left,
FactHandleList right)
Join two lists. |
|
FactHandleList(int index,
FactHandle handle)
Single value constructor. |
Method Summary | |
boolean |
contains(FactHandle handle)
Determines if the list contains a specified handle. |
boolean |
containsAll(FactHandleList other)
Determines if the list is a super-set of another list. |
boolean |
equals(Object object)
|
FactHandle |
get(int index)
Obtains the handle at a specified index. |
int |
hashCode()
|
int |
length()
Obtains the length of the list. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final FactHandleList EMPTY_LIST
Constructor Detail |
public FactHandleList(FactHandleList left, FactHandleList right)
left
- The left list.right
- The right list.public FactHandleList(int index, FactHandle handle)
index
- The index at which the handle will be placed.handle
- The handle to use.Method Detail |
public FactHandle get(int index)
index
- The position from which the handle should be obtained.
null
if no handle exists.
ArrayIndexOutOfBoundsException
- if index
> length()
.public boolean contains(FactHandle handle)
handle
- The handle to search for.
true
if the handle is found; otherwise false
public boolean containsAll(FactHandleList other)
other
- The list to be checked.
true
if this list contains all values from the other list; false otherwise.
public int length()
null
values.public int hashCode()
public boolean equals(Object object)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |