public class JTupleTemplate extends java.lang.Object implements java.lang.Iterable<IJArg>, IJTupleTemplate
Constructor and Description |
---|
JTupleTemplate(IJArg arg) |
Modifier and Type | Method and Description |
---|---|
void |
addArg(IJArg arg) |
IJArg |
getArg(int i) |
int |
getNArgs() |
java.util.Iterator<IJArg> |
iterator() |
boolean |
match(Tuple t)
specifies if the tuple template matches the tuple, or rather if tuples
belongs to the set identified by the template.
|
boolean |
propagate(Tuple t)
tries to change the tuple template object and the tuple argument in order
to meld information
|
java.lang.String |
toString() |
public JTupleTemplate(IJArg arg) throws InvalidTupleException
arg
- the JArg to add to this JTupleTemplateInvalidTupleException
- if the given JArg is invalid (e.g. null)public void addArg(IJArg arg) throws InvalidTupleException
addArg
in interface IJTupleTemplate
arg
- the JArg to add to this JTupleTemplateInvalidTupleException
- if the given JArg is invalid (e.g. null)public IJArg getArg(int i)
getArg
in interface IJTupleTemplate
i
- the index of the JArg to retrieve (starting from 0)public int getNArgs()
getNArgs
in interface IJTupleTemplate
public java.util.Iterator<IJArg> iterator()
iterator
in interface java.lang.Iterable<IJArg>
public boolean match(Tuple t)
TupleTemplate
match
in interface TupleTemplate
t
- the tuple subject to matchingpublic boolean propagate(Tuple t)
TupleTemplate
propagate
in interface TupleTemplate
t
- a tuple matching the templatepublic java.lang.String toString()
toString
in class java.lang.Object