Module org.maxicp

Record Class EndBefore

java.lang.Object
java.lang.Record
org.maxicp.modeling.algebra.bool.EndBefore
All Implemented Interfaces:
Serializable, BoolExpression, SymbolicBoolExpression, Expression, IntExpression, SymbolicIntExpression, NonLeafExpressionNode

public record EndBefore(IntervalVar intervalVar, IntExpression end) extends Record implements SymbolicBoolExpression, NonLeafExpressionNode
See Also:
  • Constructor Details

    • EndBefore

      public EndBefore(IntervalVar intervalVar, int end)
    • EndBefore

      public EndBefore(IntervalVar intervalVar, IntExpression end)
      Creates an instance of a EndBefore record class.
      Parameters:
      intervalVar - the value for the intervalVar record component
      end - the value for the end record component
  • Method Details

    • defaultEvaluateBool

      public boolean defaultEvaluateBool() throws VariableNotFixedException
      Specified by:
      defaultEvaluateBool in interface SymbolicBoolExpression
      Throws:
      VariableNotFixedException
    • isFixed

      public boolean isFixed()
      Description copied from interface: Expression
      True if the expression is fixed
      Specified by:
      isFixed in interface Expression
      Specified by:
      isFixed in interface NonLeafExpressionNode
    • computeSubexpressions

      public Collection<? extends Expression> computeSubexpressions()
      Description copied from interface: Expression
      Should be implemented by all subclasses, but not used directly. Use subexpressions() instead, which is a cached version of this. Returns a collection that contains all sub-expressions of this expression. It should not be modified. In practice, it should actually be unmutable or a copy.
      Specified by:
      computeSubexpressions in interface Expression
    • mapSubexpressions

      public IntExpression mapSubexpressions(Function<Expression,Expression> f)
      Description copied from interface: Expression
      Apply a function on all sub-expressions of this expression and returns a new expression of the same type. This function should return a value that is of the same class as the object that was given to it.
      Specified by:
      mapSubexpressions in interface Expression
      Specified by:
      mapSubexpressions in interface IntExpression
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • intervalVar

      public IntervalVar intervalVar()
      Returns the value of the intervalVar record component.
      Returns:
      the value of the intervalVar record component
    • end

      public IntExpression end()
      Returns the value of the end record component.
      Returns:
      the value of the end record component