Package org.drools.core.util.index
Class TupleIndexRBTree
java.lang.Object
org.drools.core.util.index.AbstractTupleIndexTree
org.drools.core.util.index.TupleIndexRBTree
- All Implemented Interfaces:
Externalizable,Serializable,TupleMemory
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.drools.core.util.index.AbstractTupleIndexTree
AbstractTupleIndexTree.IndexTupleListNested classes/interfaces inherited from interface org.drools.core.reteoo.TupleMemory
TupleMemory.IndexType -
Field Summary
Fields inherited from class org.drools.core.util.index.AbstractTupleIndexTree
constraintType, factSize, index, left -
Constructor Summary
ConstructorsConstructorDescriptionTupleIndexRBTree(ConstraintTypeOperator constraintType, IndexedValueReader index, boolean left) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclear()static ComparablecoerceType(IndexedValueReader index, Comparable treeRootKey, Comparable key) Iterates the entire data structure, regardless of whether TupleMemory is hashed or not.fullFastIterator(TupleImpl leftTuple) Iterator that resumes from the current RightTuple, regardless of whether the TupleMemory is hashed or notThe FactHandle is always the context fact and is necessary when the object being modified is in the both left and right node memories.iterator()voidvoidvoidintsize()voidMethods inherited from class org.drools.core.util.index.AbstractTupleIndexTree
getIndexedValue, getLeftIndexedValue, getRightIndexedValue, isIndexedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.drools.core.reteoo.TupleMemory
getIndex, isIndexed
-
Constructor Details
-
TupleIndexRBTree
public TupleIndexRBTree() -
TupleIndexRBTree
public TupleIndexRBTree(ConstraintTypeOperator constraintType, IndexedValueReader index, boolean left)
-
-
Method Details
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
add
- Specified by:
addin interfaceTupleMemory
-
remove
- Specified by:
removein interfaceTupleMemory
-
removeAdd
- Specified by:
removeAddin interfaceTupleMemory
-
size
public int size()- Specified by:
sizein interfaceTupleMemory
-
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
-
iterator
-
fastIterator
- Specified by:
fastIteratorin interfaceTupleMemory
-
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:
-
coerceType
public static Comparable coerceType(IndexedValueReader index, Comparable treeRootKey, Comparable key) -
clear
public void clear()- Specified by:
clearin interfaceTupleMemory
-
getIndexType
- Specified by:
getIndexTypein interfaceTupleMemory
-