Class CommonIntObject

java.lang.Object
edu.udel.cis.vsl.sarl.object.common.CommonSymbolicObject
edu.udel.cis.vsl.sarl.object.common.CommonIntObject
All Implemented Interfaces:
IntObject, SymbolicObject, Comparable<IntObject>

public class CommonIntObject extends CommonSymbolicObject implements IntObject
  • Method Details

    • getInt

      public int getInt()
      Description copied from interface: IntObject
      Gets the int value.
      Specified by:
      getInt in interface IntObject
      Returns:
      the int value
    • intrinsicEquals

      public boolean intrinsicEquals(SymbolicObject o)
    • computeHashCode

      public int computeHashCode()
    • toString

      public String toString()
      Description copied from interface: SymbolicObject
      Returns a string representation of this object, included here to emphasize that the method provided by Object must be overridden! Same as toStringBuffer(false).toString();
      Specified by:
      toString in interface SymbolicObject
      Overrides:
      toString in class CommonSymbolicObject
      Returns:
      a string representation of this object
    • minWith

      public IntObject minWith(IntObject that)
      Description copied from interface: IntObject
      Returns the minimum of this and that as an IntObject.
      Specified by:
      minWith in interface IntObject
      Parameters:
      that - any IntObject
      Returns:
      the minimum of this and that
    • maxWith

      public IntObject maxWith(IntObject that)
      Description copied from interface: IntObject
      Returns the maximum of this and that as an IntObject.
      Specified by:
      maxWith in interface IntObject
      Parameters:
      that - any IntObject
      Returns:
      the maximum of this and that
    • minus

      public IntObject minus(IntObject that)
      Description copied from interface: IntObject
      Returns the result of subtracting that from this, as an IntObject.
      Specified by:
      minus in interface IntObject
      Parameters:
      that - any IntObject
      Returns:
      this-that
    • plus

      public IntObject plus(IntObject that)
      Description copied from interface: IntObject
      Returns the result of addting this and that, as an IntObject.
      Specified by:
      plus in interface IntObject
      Parameters:
      that - any IntObject
      Returns:
      this+that
    • signum

      public int signum()
      Description copied from interface: IntObject
      Returns -1 if the int value is negative, 0 if the int value is zero, or +1 if the int value is positive.
      Specified by:
      signum in interface IntObject
      Returns:
      the signum of the int value
    • isZero

      public boolean isZero()
      Description copied from interface: IntObject
      Is the int value zero?
      Specified by:
      isZero in interface IntObject
      Returns:
      true iff the the int value is 0
    • isPositive

      public boolean isPositive()
      Description copied from interface: IntObject
      Is the int value positive?
      Specified by:
      isPositive in interface IntObject
      Returns:
      true iff the int value is positive
    • isNegative

      public boolean isNegative()
      Description copied from interface: IntObject
      Is the int value negative?
      Specified by:
      isNegative in interface IntObject
      Returns:
      true iff the int value is negative
    • isOne

      public boolean isOne()
      Description copied from interface: IntObject
      Is the int value 1?
      Specified by:
      isOne in interface IntObject
      Returns:
      true iff the int value is 1
    • canonizeChildren

      public void canonizeChildren(ObjectFactory factory)
      Does nothing; Basic objects have no children, so there is nothing to do.
    • compareTo

      public int compareTo(IntObject o)
      Specified by:
      compareTo in interface Comparable<IntObject>
    • toStringBuffer

      public StringBuffer toStringBuffer(boolean atomize)
      Description copied from interface: SymbolicObject
      Returns a string representation of this object as a StringBuffer. Use this instead of "toString()" for performance reasons if you are going to be building up big strings.
      Specified by:
      toStringBuffer in interface SymbolicObject
      Parameters:
      atomize - if true, place parentheses around the string if necessary in order to include this as a term in a larger expression
      Returns:
      a string representation of this object
    • toStringBufferLong

      public StringBuffer toStringBufferLong()
      Description copied from interface: SymbolicObject
      Returns a detailed string representation of this object as a StringBuffer. It never needs to be atomized.
      Specified by:
      toStringBufferLong in interface SymbolicObject
      Returns:
      detailed string representation of this object
    • symbolicObjectKind

      public final SymbolicObject.SymbolicObjectKind symbolicObjectKind()
      Description copied from interface: SymbolicObject
      Which kind of symbolic object is this? The kind determines the specific type to which this object can be safely cast. See the comments for this interface and the enumerated type SymbolicObjectKind for description.
      Specified by:
      symbolicObjectKind in interface SymbolicObject
      Returns:
      the kind of this symbolic object.
    • containsQuantifier

      public boolean containsQuantifier()
      Description copied from interface: SymbolicObject
      Does this symbolic object contain a quantified expression anywhere in its structure?
      Specified by:
      containsQuantifier in interface SymbolicObject
      Returns:
      true iff a quantified expression appears somewhere inside this object
    • containsSubobject

      public boolean containsSubobject(SymbolicObject obj)
      Description copied from interface: SymbolicObject
      Does this symbolic object contain a sub-object equal to the given one?
      Specified by:
      containsSubobject in interface SymbolicObject
      Returns:
      true iff this contains a sub-object equal to obj