Class TupleMaskIdentity
java.lang.Object
tools.refinery.interpreter.matchers.tuple.TupleMask
tools.refinery.interpreter.matchers.tuple.TupleMaskIdentity
- Since:
- 1.7
-
Field Summary
Fields inherited from class tools.refinery.interpreter.matchers.tuple.TupleMask
indices, sourceWidth
-
Method Summary
Modifier and TypeMethodDescriptionboolean
revertFrom
(ITuple masked) Returns a tuple `result` that satisfies `this.transform(result).equals(masked)`.<T> List
<T> Generates an immutable, masked view of the original tuple.Generates an immutable, masked view of the original tuple.Transforms a given mask directly, instead of transforming tuples that were transformed by the other mask.Methods inherited from class tools.refinery.interpreter.matchers.tuple.TupleMask
append, combine, constructLinearSequence, displace, empty, equals, fromKeepIndicators, fromNonNullIndices, fromSelectedIndices, fromSelectedIndices, fromSelectedIndicesInternal, fromSelectedMonotonicIndicesInternal, getFirstOmittedIndex, getIndicesAsList, getSize, getSourceWidth, getValue, hashCode, identity, integersToIntArray, isNonrepeating, keepSelectedIndices, linear, omit, selectSingle, set, toString, transformUnique
-
Method Details
-
transform
Description copied from class:TupleMask
Generates an immutable, masked view of the original tuple.The list will have arity
TupleMask.getSize()
, and will consist of the elements of the original tuple, at positions indicated by this mask. -
transform
Description copied from class:TupleMask
Generates an immutable, masked view of the original tuple.The new tuple will have arity
TupleMask.getSize()
, and will consist of the elements of the original tuple, at positions indicated by this mask. -
transform
Description copied from class:TupleMask
Transforms a given mask directly, instead of transforming tuples that were transformed by the other mask. -
revertFrom
Description copied from class:TupleMask
Returns a tuple `result` that satisfies `this.transform(result).equals(masked)`. Positions of the result tuple that are not determined this way will be filled with null.- Overrides:
revertFrom
in classTupleMask
-
isIdentity
public boolean isIdentity()- Overrides:
isIdentity
in classTupleMask
- Returns:
- true iff this mask is a no-op
-