Package org.drools.core.common
Class EqualityKey
- All Implemented Interfaces:
Externalizable,Serializable
Upon instantiation the EqualityKey caches the first Object's hashCode
this can never change. The EqualityKey has an internal datastructure
which references all the handles which are equal. It also records
Whether the referenced facts are JUSTIFIED or STATED
- 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>> -
Field Summary
FieldsFields inherited from class org.drools.core.util.LinkedList
fastIterator -
Constructor Summary
ConstructorsConstructorDescriptionEqualityKey(InternalFactHandle handle) EqualityKey(InternalFactHandle handle, int status) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFactHandle(InternalFactHandle handle) booleanEquality for the EqualityKey means two things.abstract InternalFactHandleintinthashCode()Returns the cached hashCodevoidvoidremoveFactHandle(InternalFactHandle handle) abstract voidsetLogicalFactHandle(InternalFactHandle logicalFactHandle) voidsetStatus(int status) toString()voidMethods inherited from class org.drools.core.util.LinkedList
add, addAllToCollection, addFirst, addLast, clear, contains, copyStateInto, fastIterator, get, get, getFirst, getLast, insertAfter, isEmpty, javaUtilIterator, remove, removeAdd, removeFirst, removeLast, size
-
Field Details
-
STATED
public static final int STATED- See Also:
-
JUSTIFIED
public static final int JUSTIFIED- See Also:
-
-
Constructor Details
-
EqualityKey
public EqualityKey() -
EqualityKey
-
EqualityKey
-
-
Method Details
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classLinkedList<DefaultFactHandle>- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classLinkedList<DefaultFactHandle>- Throws:
IOException
-
getLogicalFactHandle
-
setLogicalFactHandle
-
getFactHandle
-
addFactHandle
-
removeFactHandle
-
getStatus
public int getStatus()- Returns:
- the status
-
setStatus
public void setStatus(int status) - Parameters:
status- the status to set
-
toString
-
hashCode
public int hashCode()Returns the cached hashCode- Overrides:
hashCodein classLinkedList<DefaultFactHandle>- See Also:
-
equals
Equality for the EqualityKey means two things. It returns true if the object is also an EqualityKey the of the same the same identity as this. It also returns true if the object is equal to the head FactHandle's referenced Object.- Overrides:
equalsin classLinkedList<DefaultFactHandle>
-