public abstract class AstClafer extends Object implements AstVar
| Modifier and Type | Field and Description |
|---|---|
protected AstAbstractClafer |
claferClafer |
| Modifier and Type | Method and Description |
|---|---|
AstConcreteClafer |
addChild(String name)
Add a new concrete child under this Clafer.
|
AstConstraint |
addConstraint(AstBoolExpr expr)
Add a new constraint under this Clafer.
|
boolean |
equals(Object obj) |
AstClafer |
extending(AstAbstractClafer superClafer)
Set the supertype of this Clafer.
|
List<AstConcreteClafer> |
getChildren()
Returns this Clafer's concrete children
|
List<AstConstraint> |
getConstraints()
Returns this Clafer's constraints.
|
Card |
getGroupCard()
Returns this Clafer's group cardinality.
|
String |
getName()
Returns the name of the Clafer.
|
AstRef |
getRef()
Returns this Clafer's reference
|
AstAbstractClafer |
getSuperClafer()
Returns the supertype of this Clafer.
|
boolean |
hasChildren()
Checks if this Clafer has any concrete children.
|
boolean |
hasConstraints()
Checks if this Clafer has any constraints.
|
int |
hashCode() |
boolean |
hasRef()
Check if this Clafer references another Clafer.
|
boolean |
hasSuperClafer()
Check if this Clafer has a supertype.
|
AstClafer |
refTo(AstClafer targetType)
Set this Clafer's reference to target type.
|
AstClafer |
refToUnique(AstClafer targetType)
Set this Clafer's reference to target type along with a uniqueness
constraint.
|
String |
toString() |
AstClafer |
withGroupCard(Card groupCard)
Set this Clafer's group cardinality.
|
AstClafer |
withGroupCard(int low)
Set this Clafer's low group cardinality and set the high group
cardinality to unbounded.
|
AstClafer |
withGroupCard(int low,
int high)
Set this Clafer's group cardinality.
|
protected final AstAbstractClafer claferClafer
public boolean hasSuperClafer()
true if and only if this Clafer has a supertype,
false otherwisepublic AstAbstractClafer getSuperClafer()
public AstClafer extending(AstAbstractClafer superClafer)
superClafer - the supertypepublic boolean hasRef()
true if and only if this Clafer references another
Clafer, false otherwisepublic AstClafer refTo(AstClafer targetType)
targetType - the type to refer topublic AstClafer refToUnique(AstClafer targetType)
targetType - the type to refer topublic Card getGroupCard()
public AstClafer withGroupCard(Card groupCard)
groupCard - the group cardinalitypublic AstClafer withGroupCard(int low)
low - the low group cardinalitypublic AstClafer withGroupCard(int low, int high)
low - the low group cardinalityhigh - the high group cardinalitypublic boolean hasChildren()
true if and only if this Clafer has children,
false otherwisepublic List<AstConcreteClafer> getChildren()
public AstConcreteClafer addChild(String name)
name - the name of the childpublic boolean hasConstraints()
true if and only if this Clafer has constraints,
false otherwisepublic List<AstConstraint> getConstraints()
public AstConstraint addConstraint(AstBoolExpr expr)
expr - a tautologyCopyright © 2013. All Rights Reserved.