Package org.xcsp.parser.entries
Class XConstraints.XLogic
- java.lang.Object
-
- org.xcsp.parser.entries.ParsingEntry
-
- org.xcsp.parser.entries.ParsingEntry.CEntry
-
- org.xcsp.parser.entries.XConstraints.CEntryReifiable
-
- org.xcsp.parser.entries.XConstraints.XLogic
-
- Enclosing class:
- XConstraints
public static final class XConstraints.XLogic extends XConstraints.CEntryReifiable
The class for representing a logic-based meta-constraint<and>, <or>, <iff>, <not>, <ifThen>, or <ifThenElse>
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.xcsp.parser.entries.ParsingEntry
ParsingEntry.CEntry, ParsingEntry.OEntry, ParsingEntry.VEntry
-
-
Field Summary
Fields Modifier and Type Field Description XConstraints.CEntryReifiable[]
components
The components involved in the logical meta-constraint.Types.TypeCtr
type
The type of the meta-constraint.-
Fields inherited from class org.xcsp.parser.entries.XConstraints.CEntryReifiable
reification, softening
-
Fields inherited from class org.xcsp.parser.entries.ParsingEntry
attributes, classes, flags, id, note
-
-
Constructor Summary
Constructors Constructor Description XLogic(Types.TypeCtr type, XConstraints.CEntryReifiable... components)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinkedHashSet<XVariables.XVar>
collectVars(LinkedHashSet<XVariables.XVar> set)
Collect the set of variables involved in this element, and add them to the specified set.Types.TypeCtr
getType()
Returns the type of the meta-constraint.boolean
subjectToAbstraction()
Returns true iff this element is subject to abstraction, i.e., contains parameters (tokens of the form %i or %...).String
toString()
-
Methods inherited from class org.xcsp.parser.entries.ParsingEntry.CEntry
vars
-
Methods inherited from class org.xcsp.parser.entries.ParsingEntry
copyAttributesOf, getAttributeValue, getAttributeValue, getAttributeValue
-
-
-
-
Field Detail
-
type
public final Types.TypeCtr type
The type of the meta-constraint.
-
components
public final XConstraints.CEntryReifiable[] components
The components involved in the logical meta-constraint. Usually, these components are stand-alone constraints.
-
-
Constructor Detail
-
XLogic
public XLogic(Types.TypeCtr type, XConstraints.CEntryReifiable... components)
-
-
Method Detail
-
getType
public final Types.TypeCtr getType()
Returns the type of the meta-constraint. We need an accessor for Scala.
-
collectVars
public LinkedHashSet<XVariables.XVar> collectVars(LinkedHashSet<XVariables.XVar> set)
Description copied from class:ParsingEntry.CEntry
Collect the set of variables involved in this element, and add them to the specified set.- Overrides:
collectVars
in classXConstraints.CEntryReifiable
-
subjectToAbstraction
public boolean subjectToAbstraction()
Description copied from class:ParsingEntry.CEntry
Returns true iff this element is subject to abstraction, i.e., contains parameters (tokens of the form %i or %...).- Specified by:
subjectToAbstraction
in classParsingEntry.CEntry
-
toString
public String toString()
- Overrides:
toString
in classXConstraints.CEntryReifiable
-
-