Class BaseLeftInheritanceTuple
java.lang.Object
tools.refinery.interpreter.matchers.tuple.AbstractTuple
tools.refinery.interpreter.matchers.tuple.Tuple
tools.refinery.interpreter.matchers.tuple.BaseLeftInheritanceTuple
- All Implemented Interfaces:
ITuple
- Direct Known Subclasses:
LeftInheritanceTuple
,LeftInheritanceTuple1
,LeftInheritanceTuple2
,LeftInheritanceTuple3
,LeftInheritanceTuple4
Common functionality of left inheritance tuple implementations.
Left inheritance tuples inherit their first few elements from another tuple, and extend it with additional "local" elements.
- Since:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Tuple
This object contains the same elements as the ancestor on the first inheritedIndex positionsprotected final int
The number of elements that aren't stored locally, but inherited from an ancestor Tuple instead.Fields inherited from class tools.refinery.interpreter.matchers.tuple.Tuple
cachedHash
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int
protected boolean
internalEquals
(ITuple other) Optimized equals calculation (prediction: true, since hash values match)protected abstract boolean
Checks the equivalence of local elements only, after ancestor tuple has been determined to be equal.Methods inherited from class tools.refinery.interpreter.matchers.tuple.Tuple
equals, hashCode, replaceAll, toImmutable
Methods inherited from class tools.refinery.interpreter.matchers.tuple.AbstractTuple
doCalcHash, getDistinctElements, getElements, invertIndex, invertIndexWithMupliplicity, raiseIndexingError, toString
-
Field Details
-
inheritedIndex
protected final int inheritedIndexThe number of elements that aren't stored locally, but inherited from an ancestor Tuple instead. -
ancestor
This object contains the same elements as the ancestor on the first inheritedIndex positions
-
-
Constructor Details
-
BaseLeftInheritanceTuple
- Parameters:
ancestor
-
-
-
Method Details
-
getLocalSize
public abstract int getLocalSize()- Returns:
- the number of local (non-inherited) elements
-
internalEquals
Optimized equals calculation (prediction: true, since hash values match)- Overrides:
internalEquals
in classAbstractTuple
-
localEquals
Checks the equivalence of local elements only, after ancestor tuple has been determined to be equal.
-