Package org.drools.core.util.index
Class TupleList
- All Implemented Interfaces:
Externalizable,Serializable,TupleMemory,SingleLinkedEntry<TupleList>
- Direct Known Subclasses:
AbstractHashTable.IndexTupleList,AbstractTupleIndexTree.IndexTupleList,TupleListWithContext,TupleRBTree.Node
public class TupleList
extends LinkedList<TupleImpl>
implements TupleMemory, SingleLinkedEntry<TupleList>, Serializable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.drools.core.util.LinkedList
LinkedList.JavaUtilIterator<T extends DoubleLinkedEntry<T>>, LinkedList.LinkedListFastIterator, LinkedList.LinkedListIterator<T extends DoubleLinkedEntry<T>>, LinkedList.TMSLinkedListFastIterator<K extends SingleLinkedEntry<K>>Nested classes/interfaces inherited from interface org.drools.core.reteoo.TupleMemory
TupleMemory.IndexType -
Field Summary
FieldsFields inherited from class org.drools.core.util.LinkedList
fastIterator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd aLinkedListNodeto the list.protected voidcopyStateInto(TupleList other) Iterates the entire data structure, regardless of whether TupleMemory is hashed or not.fullFastIterator(TupleImpl tuple) Iterator that resumes from the current RightTuple, regardless of whether the TupleMemory is hashed or notget(InternalFactHandle handle) The FactHandle is always the context fact and is necessary when the object being modified is in the both left and right node memories.getNext()booleanvoidRemoves aLinkedListNodefrom the list.Remove the first node from the list.Remove the last node from the list.voidtoString()Methods inherited from class org.drools.core.util.LinkedList
addAllToCollection, addFirst, addLast, clear, contains, copyStateInto, equals, get, get, getFirst, getLast, hashCode, insertAfter, isEmpty, javaUtilIterator, readExternal, removeAdd, size, writeExternalMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.drools.core.reteoo.TupleMemory
clear, getIndex, removeAdd, size
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
-
Constructor Details
-
TupleList
public TupleList() -
TupleList
-
-
Method Details
-
add
Description copied from class:LinkedListAdd aLinkedListNodeto the list. If theLinkedListis empty then the first and last nodes are set to the added node.- Specified by:
addin interfaceTupleMemory- Overrides:
addin classLinkedList<TupleImpl>- Parameters:
node- TheLinkedListNodeto be added
-
remove
Description copied from class:LinkedListRemoves aLinkedListNodefrom the list. This works by attach the previous reference to the child reference. When the node to be removed is the first node it callsremoveFirst(). When the node to be removed is the last node it callsremoveLast().- Specified by:
removein interfaceTupleMemory- Overrides:
removein classLinkedList<TupleImpl>- Parameters:
node- TheLinkedListNodeto be removed.
-
getFirst
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
-
get
-
removeFirst
Description copied from class:LinkedListRemove the first node from the list. The next node then becomes the first node. If this is the last node then both first and last node references are set to null.- Overrides:
removeFirstin classLinkedList<TupleImpl>- Returns:
- The first
LinkedListNode.
-
removeLast
Description copied from class:LinkedListRemove the last node from the list. The previous node then becomes the last node. If this is the last node then both first and last node references are set to null.- Overrides:
removeLastin classLinkedList<TupleImpl>- Returns:
- The first
LinkedListNode.
-
getIndexType
- Specified by:
getIndexTypein interfaceTupleMemory
-
fastIterator
- Specified by:
fastIteratorin interfaceTupleMemory- Overrides:
fastIteratorin classLinkedList<TupleImpl>
-
fullFastIterator
Description copied from interface:TupleMemoryIterates the entire data structure, regardless of whether TupleMemory is hashed or not.- Specified by:
fullFastIteratorin interfaceTupleMemory- Returns:
-
fullFastIterator
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:
-
isIndexed
public boolean isIndexed()- Specified by:
isIndexedin interfaceTupleMemory
-
getNext
- Specified by:
getNextin interfaceSingleLinkedEntry<TupleList>
-
setNext
- Specified by:
setNextin interfaceSingleLinkedEntry<TupleList>
-
toString
-
copyStateInto
-