public abstract class AbstractCompositeConstraint extends MutableTypeConstraint
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractCompositeConstraint.MultiFieldConstraintContextEntry
A context entry for composite restrictions
|
Constraint.ConstraintType
Modifier and Type | Field and Description |
---|---|
protected AlphaNodeFieldConstraint[] |
alphaConstraints |
protected BetaNodeFieldConstraint[] |
betaConstraints |
protected Declaration[] |
requiredDeclarations |
Constructor and Description |
---|
AbstractCompositeConstraint() |
Modifier and Type | Method and Description |
---|---|
void |
addAlphaConstraint(AlphaNodeFieldConstraint constraint)
Adds an alpha constraint to the multi field OR constraint
|
void |
addBetaConstraint(BetaNodeFieldConstraint constraint)
Adds a beta constraint to this multi field OR constraint
|
void |
addConstraint(Constraint constraint)
Adds a constraint too all lists it belongs to by checking for its type
|
abstract AbstractCompositeConstraint |
clone()
Clones the constraint
|
ContextEntry |
createContextEntry() |
boolean |
equals(Object object) |
AlphaNodeFieldConstraint[] |
getAlphaConstraints() |
BetaNodeFieldConstraint[] |
getBetaConstraints() |
Declaration[] |
getRequiredDeclarations()
Returns all the declarations required by the given
constraint implementation.
|
int |
hashCode() |
boolean |
isTemporal()
Returns true in case this constraint is a temporal constraint
|
void |
readExternal(ObjectInput in) |
void |
replaceDeclaration(Declaration oldDecl,
Declaration newDecl)
When a rule contains multiple logical branches, i.e., makes
use of 'OR' CE, it is required to clone patterns and declarations
for each logical branch.
|
protected void |
updateRequiredDeclarations(Constraint constraint)
Updades the cached required declaration array
|
void |
writeExternal(ObjectOutput out) |
cloneIfInUse, getType, setInUse, setType
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isAllowed
isAllowedCachedLeft, isAllowedCachedRight
protected AlphaNodeFieldConstraint[] alphaConstraints
protected BetaNodeFieldConstraint[] betaConstraints
protected Declaration[] requiredDeclarations
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class MutableTypeConstraint
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class MutableTypeConstraint
IOException
public AlphaNodeFieldConstraint[] getAlphaConstraints()
public BetaNodeFieldConstraint[] getBetaConstraints()
public boolean isTemporal()
Constraint
public void addAlphaConstraint(AlphaNodeFieldConstraint constraint)
constraint
- public void addBetaConstraint(BetaNodeFieldConstraint constraint)
constraint
- public void addConstraint(Constraint constraint)
constraint
- protected void updateRequiredDeclarations(Constraint constraint)
constraint
- public Declaration[] getRequiredDeclarations()
public void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
public ContextEntry createContextEntry()
public abstract AbstractCompositeConstraint clone()
Constraint
clone
in interface Constraint
clone
in class MutableTypeConstraint
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.