Class ConstraintSeparator


  • public class ConstraintSeparator
    extends java.lang.Object
    Class for extracting the constraints out of a Project.
    This class is also able to separate constraints into the following categories:
    • AssignmentConstraints - Assigning one value to exactly one variable
    • Constraints - all other constraints without the AssignmentConstraints
    • All constraints
    Author:
    El-Sharkawy
    • Field Detail

      • allConstraints

        private java.util.List<Constraint> allConstraints
      • assignmentConstraints

        private java.util.List<Constraint> assignmentConstraints
      • normalConstraints

        private java.util.List<Constraint> normalConstraints
    • Constructor Detail

      • ConstraintSeparator

        public ConstraintSeparator​(Project project)
        This constructor will consider imported projects.
        Parameters:
        project - The project, where all constraints should be found.
      • ConstraintSeparator

        public ConstraintSeparator​(Project project,
                                   boolean considerImports)
        Constructor for specifying whether imported projects should be considered while finding the constraints.
        Parameters:
        project - The project, where all constraints should be found and separated into the categories mentioned above.
        considerImports - true if constraints of imported projects should also be found
    • Method Detail

      • getAllConstraints

        public java.util.List<Constraint> getAllConstraints()
        Getter for returning all constraints of an ivml project.
        Returns:
        A list of all constraints in the specified ivml project.
      • getAssingmentConstraints

        public java.util.List<Constraint> getAssingmentConstraints()
        Getter for returning all AssignmentConstraints of an ivml project.
        Returns:
        A list of all AssignmentConstraints in the specified ivml project.
      • getNormalConstraints

        public java.util.List<Constraint> getNormalConstraints()
        Getter for returning all non AssignmentConstraints of an ivml project.
        Returns:
        A list of all non AssignmentConstraints in the specified ivml project.