Package org.drools.core.util.index
Class TupleList<C>
- java.lang.Object
-
- org.drools.core.util.index.TupleList<C>
-
- All Implemented Interfaces:
java.io.Serializable,TupleMemory,Entry<TupleList<C>>
- Direct Known Subclasses:
AbstractHashTable.IndexTupleList,AbstractTupleIndexTree.IndexTupleList,FastUtilHashTupleMemory.IndexTupleList,TupleRBTree.Node
public class TupleList<C> extends java.lang.Object implements TupleMemory, Entry<TupleList<C>>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTupleList.TupleHashTableIterator-
Nested classes/interfaces inherited from interface org.drools.core.reteoo.TupleMemory
TupleMemory.IndexType
-
-
Field Summary
Fields Modifier and Type Field Description static longserialVersionUID
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Tuple tuple)voidclear()protected voidcopyStateInto(TupleList other)FastIterator<Tuple>fastIterator()FastIterator<Tuple>fullFastIterator()Iterates the entire data structure, regardless of whether TupleMemory is hashed or not.FastIterator<Tuple>fullFastIterator(Tuple tuple)Iterator that resumes from the current RightTuple, regardless of whether the TupleMemory is hashed or notTupleget(InternalFactHandle handle)Tupleget(Tuple tuple)CgetContext()TuplegetFirst()TuplegetFirst(Tuple tuple)The FactHandle is always the context fact and is necessary when the object being modified is in the both left and right node memories.TupleMemory.IndexTypegetIndexType()TuplegetLast()TupleListgetNext()booleanisEmpty()booleanisIndexed()Iterator<Tuple>iterator()voidremove(Tuple tuple)voidremoveAdd(Tuple tuple)TupleremoveFirst()voidsetNext(TupleList next)intsize()Tuple[]toArray()java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.core.reteoo.TupleMemory
getIndex
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getContext
public C getContext()
-
isEmpty
public boolean isEmpty()
-
getFirst
public Tuple getFirst(Tuple tuple)
Description copied from interface:TupleMemoryThe FactHandle is always the context fact and is necessary when the object being modified is in the both left and right node memories. This is because the memory on the opposite side would not have yet memory.removeAdd the fact, so it could potentially be in the wrong bucket. So the bucket matches check always checks to ignore the first facthandle if it's the same as the context fact.- Specified by:
getFirstin interfaceTupleMemory
-
getFirst
public Tuple getFirst()
-
getLast
public Tuple getLast()
-
clear
public void clear()
- Specified by:
clearin interfaceTupleMemory
-
removeAdd
public void removeAdd(Tuple tuple)
- Specified by:
removeAddin interfaceTupleMemory
-
add
public void add(Tuple tuple)
- Specified by:
addin interfaceTupleMemory
-
remove
public void remove(Tuple tuple)
- Specified by:
removein interfaceTupleMemory
-
removeFirst
public Tuple removeFirst()
-
get
public Tuple get(InternalFactHandle handle)
-
size
public int size()
- Specified by:
sizein interfaceTupleMemory
-
toArray
public Tuple[] toArray()
- Specified by:
toArrayin interfaceTupleMemory
-
getIndexType
public TupleMemory.IndexType getIndexType()
- Specified by:
getIndexTypein interfaceTupleMemory
-
fastIterator
public FastIterator<Tuple> fastIterator()
- Specified by:
fastIteratorin interfaceTupleMemory
-
fullFastIterator
public FastIterator<Tuple> fullFastIterator()
Description copied from interface:TupleMemoryIterates the entire data structure, regardless of whether TupleMemory is hashed or not.- Specified by:
fullFastIteratorin interfaceTupleMemory- Returns:
-
fullFastIterator
public FastIterator<Tuple> fullFastIterator(Tuple tuple)
Description copied from interface:TupleMemoryIterator that resumes from the current RightTuple, regardless of whether the TupleMemory is hashed or not- Specified by:
fullFastIteratorin interfaceTupleMemory- Returns:
-
iterator
public Iterator<Tuple> iterator()
- Specified by:
iteratorin interfaceTupleMemory
-
isIndexed
public boolean isIndexed()
- Specified by:
isIndexedin interfaceTupleMemory
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
copyStateInto
protected void copyStateInto(TupleList other)
-
-