Class IntegerVariable


  • public class IntegerVariable
    extends Variable
    This class models an integer variable as a mathematical term.
    Author:
    Matthias Thimm
    • Constructor Detail

      • IntegerVariable

        public IntegerVariable​(java.lang.String name)
        Creates a new variable with the given name.
        Parameters:
        name - the name of this variable.
      • IntegerVariable

        public IntegerVariable​(java.lang.String name,
                               boolean isPositive)
        Creates a new variable with the given name.
        Parameters:
        name - the name of this variable.
        isPositive - whether this variables should be positive.
      • IntegerVariable

        public IntegerVariable​(java.lang.String name,
                               double lowerBound,
                               double upperBound)
        Creates a new variable with the given name and bounds.
        Parameters:
        name - the name of this variable.
        lowerBound - the lower bound of the variable.
        upperBound - the upper bound of the variable.
    • Method Detail

      • isInteger

        public boolean isInteger()
        Description copied from class: Term
        Checks whether this term represents an integer value.
        Specified by:
        isInteger in class Term
        Returns:
        "true" iff this term represents an integer value.