public class OneOfParam extends DefaultConstraintParam<Object>
| Modifier and Type | Field and Description |
|---|---|
protected List<ConstraintParam<?>> |
paramsList |
| Constructor and Description |
|---|
OneOfParam(String n,
ConstraintParam<?>... params)
Make a new multiple types parameter.
|
| Modifier and Type | Method and Description |
|---|---|
String |
fullSignature()
Get the signature of the parameter including the parameter name.
|
boolean |
isCompatibleWith(BtrPlaceTree t,
BtrpOperand o)
Check if a given operand is compatible with this parameter.
|
String |
prettySignature()
Get the signature of the parameter without the parameter name.
|
Object |
transform(SatConstraintBuilder cb,
BtrPlaceTree tree,
BtrpOperand op)
Transform an operand into the right btrplace parameter.
|
getNameprotected List<ConstraintParam<?>> paramsList
public OneOfParam(String n, ConstraintParam<?>... params)
n - the parameter nameparams - the list of different parameters typespublic String prettySignature()
ConstraintParamprettySignature in interface ConstraintParam<Object>prettySignature in class DefaultConstraintParam<Object>public String fullSignature()
ConstraintParamfullSignature in interface ConstraintParam<Object>fullSignature in class DefaultConstraintParam<Object>public Object transform(SatConstraintBuilder cb, BtrPlaceTree tree, BtrpOperand op)
ConstraintParamcb - the associated constrainttree - the tree use to propagate errorsop - the operand to transformnull if the transformation is not possiblepublic boolean isCompatibleWith(BtrPlaceTree t, BtrpOperand o)
ConstraintParamt - the tree used to propagate errorso - the operand to testtrue iff the operand is compatibleCopyright © 2016 University of Nice-Sophia Antipolis. All Rights Reserved.