Package eu.bandm.tools.paisley
Class TotalTransform<A,B>
java.lang.Object
eu.bandm.tools.paisley.AbstractPattern<A>
eu.bandm.tools.paisley.Unary<B,A>
eu.bandm.tools.paisley.Transform<A,B>
eu.bandm.tools.paisley.TotalTransform<A,B>
- Type Parameters:
A- the target type of the containing patternB- the target type of the contained subpattern
- All Implemented Interfaces:
Pattern<A>,Serializable,Cloneable
@Generated(generator="eu.bandm.tools.expander",
version="",
timestamp="2026-01-12T17:56:31")
public abstract class TotalTransform<A,B>
extends Transform<A,B>
Abstract base class for patterns that delegate transformed targets to a
subpattern.
Subclasses must implement the Transform.apply(A) method.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTotalTransform(Pattern<? super B> body) Creates a new instance. -
Method Summary
Methods inherited from class eu.bandm.tools.paisley.Unary
binds, clear, cut, fork, getBody, isDeterministic, matchAgain, preserves, preserves, setBodyMethods inherited from class eu.bandm.tools.paisley.AbstractPattern
clone, doclone
-
Constructor Details
-
TotalTransform
Creates a new instance.
-
-
Method Details
-
match
Attempts to match this pattern against a given object.If the class of this pattern imposes a specific order on matches, the first one is chosen.
The
nulltarget is generally allowed.This implementation matches the subpattern against the result of
apply(target).- Parameters:
target- the object to match against- Returns:
trueif the matching is successful,falseif it fails. WhichVariables are bound by a successful or failed match depends.- See Also:
-
of
public static <A,B> TotalTransform<A,B> of(Function<? super A, ? extends B> fun, Pattern<? super B> body) -
with
-