Package eu.bandm.tools.paisley
Class Theme<A,B>
java.lang.Object
eu.bandm.tools.paisley.AbstractPattern<B>
eu.bandm.tools.paisley.Unary<B,B>
eu.bandm.tools.paisley.Proxy<B>
eu.bandm.tools.paisley.Theme<A,B>
- Type Parameters:
A- the subtarget type of objects to match the argument variable againstB- the target type of objects to match the entire pattern against
- All Implemented Interfaces:
Extractor<A>,Pattern<B>,Serializable,Cloneable
@Generated(generator="eu.bandm.tools.expander",
version="",
timestamp="2025-12-18T16:24:39")
public class Theme<A,B>
extends Proxy<B>
implements Extractor<A>
Pattern with a distinguished argument variable.
This class provides the simplest patterns that can be derived from a
Motif, by filling the hole with a variable.
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
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, docloneMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.bandm.tools.paisley.Extractor
bind, eagerBindings, lazyBindings, stream
-
Constructor Details
-
Theme
Creates a new instance.- Parameters:
body- the main pattern, which should bind the argument variablearg- the argument variable- Throws:
NullPointerException- ifbodyorargis null
-
-
Method Details
-
getArgument
Returns the argument variable.- Returns:
- the argument variable
-
getValue
Returns the extracted data value.The result is unspecified if the pattern viewed by this extractor is not in the state after a successful match.
-
lambda
Converts this pattern into a motif.- Returns:
- a motif that has the occurrences of the argument variable as the hole
- See Also:
-
eagerBindings
-
lazyBindings
-