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
,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 class
TupleList.TupleHashTableIterator
-
Nested classes/interfaces inherited from interface org.drools.core.reteoo.TupleMemory
TupleMemory.IndexType
-
-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Tuple tuple)
void
clear()
protected void
copyStateInto(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 notTuple
get(InternalFactHandle handle)
Tuple
get(Tuple tuple)
C
getContext()
Tuple
getFirst()
Tuple
getFirst(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.IndexType
getIndexType()
Tuple
getLast()
TupleList
getNext()
boolean
isEmpty()
boolean
isIndexed()
Iterator<Tuple>
iterator()
void
remove(Tuple tuple)
void
removeAdd(Tuple tuple)
Tuple
removeFirst()
void
setNext(TupleList next)
int
size()
Tuple[]
toArray()
java.lang.String
toString()
-
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:TupleMemory
The 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:
getFirst
in interfaceTupleMemory
-
getFirst
public Tuple getFirst()
-
getLast
public Tuple getLast()
-
clear
public void clear()
- Specified by:
clear
in interfaceTupleMemory
-
removeAdd
public void removeAdd(Tuple tuple)
- Specified by:
removeAdd
in interfaceTupleMemory
-
add
public void add(Tuple tuple)
- Specified by:
add
in interfaceTupleMemory
-
remove
public void remove(Tuple tuple)
- Specified by:
remove
in interfaceTupleMemory
-
removeFirst
public Tuple removeFirst()
-
get
public Tuple get(InternalFactHandle handle)
-
size
public int size()
- Specified by:
size
in interfaceTupleMemory
-
toArray
public Tuple[] toArray()
- Specified by:
toArray
in interfaceTupleMemory
-
getIndexType
public TupleMemory.IndexType getIndexType()
- Specified by:
getIndexType
in interfaceTupleMemory
-
fastIterator
public FastIterator<Tuple> fastIterator()
- Specified by:
fastIterator
in interfaceTupleMemory
-
fullFastIterator
public FastIterator<Tuple> fullFastIterator()
Description copied from interface:TupleMemory
Iterates the entire data structure, regardless of whether TupleMemory is hashed or not.- Specified by:
fullFastIterator
in interfaceTupleMemory
- Returns:
-
fullFastIterator
public FastIterator<Tuple> fullFastIterator(Tuple tuple)
Description copied from interface:TupleMemory
Iterator that resumes from the current RightTuple, regardless of whether the TupleMemory is hashed or not- Specified by:
fullFastIterator
in interfaceTupleMemory
- Returns:
-
iterator
public Iterator<Tuple> iterator()
- Specified by:
iterator
in interfaceTupleMemory
-
isIndexed
public boolean isIndexed()
- Specified by:
isIndexed
in interfaceTupleMemory
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
copyStateInto
protected void copyStateInto(TupleList other)
-
-