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>
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.udel.cis.vsl.sarl.IF.object.SymbolicObject
SymbolicObject.SymbolicObjectKind -
Method Summary
Modifier and TypeMethodDescriptionvoidcanonizeChildren(ObjectFactory factory) Does nothing; Basic objects have no children, so there is nothing to do.intintbooleanDoes this symbolic object contain a quantified expression anywhere in its structure?booleanDoes this symbolic object contain a sub-object equal to the given one?intgetInt()Gets the int value.booleanbooleanIs the int value negative?booleanisOne()Is the int value 1?booleanIs the int value positive?booleanisZero()Is the int value zero?Returns the maximum of this and that as an IntObject.Returns the result of subtracting that from this, as an IntObject.Returns the minimum of this and that as an IntObject.Returns the result of addting this and that, as an IntObject.intsignum()Returns -1 if the int value is negative, 0 if the int value is zero, or +1 if the int value is positive.Which kind of symbolic object is this? The kind determines the specific type to which this object can be safely cast.toString()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();toStringBuffer(boolean atomize) Returns a string representation of this object as a StringBuffer.Returns a detailed string representation of this object as a StringBuffer.Methods inherited from class edu.udel.cis.vsl.sarl.object.common.CommonSymbolicObject
equals, getOrder, hashCode, id, isCanonic, setInCanonic, setOrderMethods inherited from interface edu.udel.cis.vsl.sarl.IF.object.SymbolicObject
equals, getOrder, hashCode, id, isCanonic, setInCanonic, setOrder
-
Method Details
-
getInt
public int getInt()Description copied from interface:IntObjectGets the int value. -
intrinsicEquals
-
computeHashCode
public int computeHashCode() -
toString
Description copied from interface:SymbolicObjectReturns 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:
toStringin interfaceSymbolicObject- Overrides:
toStringin classCommonSymbolicObject- Returns:
- a string representation of this object
-
minWith
Description copied from interface:IntObjectReturns the minimum of this and that as an IntObject. -
maxWith
Description copied from interface:IntObjectReturns the maximum of this and that as an IntObject. -
minus
Description copied from interface:IntObjectReturns the result of subtracting that from this, as an IntObject. -
plus
Description copied from interface:IntObjectReturns the result of addting this and that, as an IntObject. -
signum
public int signum()Description copied from interface:IntObjectReturns -1 if the int value is negative, 0 if the int value is zero, or +1 if the int value is positive. -
isZero
public boolean isZero()Description copied from interface:IntObjectIs the int value zero? -
isPositive
public boolean isPositive()Description copied from interface:IntObjectIs the int value positive?- Specified by:
isPositivein interfaceIntObject- Returns:
- true iff the int value is positive
-
isNegative
public boolean isNegative()Description copied from interface:IntObjectIs the int value negative?- Specified by:
isNegativein interfaceIntObject- Returns:
- true iff the int value is negative
-
isOne
public boolean isOne()Description copied from interface:IntObjectIs the int value 1? -
canonizeChildren
Does nothing; Basic objects have no children, so there is nothing to do. -
compareTo
- Specified by:
compareToin interfaceComparable<IntObject>
-
toStringBuffer
Description copied from interface:SymbolicObjectReturns 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:
toStringBufferin interfaceSymbolicObject- 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
Description copied from interface:SymbolicObjectReturns a detailed string representation of this object as a StringBuffer. It never needs to be atomized.- Specified by:
toStringBufferLongin interfaceSymbolicObject- Returns:
- detailed string representation of this object
-
symbolicObjectKind
Description copied from interface:SymbolicObjectWhich 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:
symbolicObjectKindin interfaceSymbolicObject- Returns:
- the kind of this symbolic object.
-
containsQuantifier
public boolean containsQuantifier()Description copied from interface:SymbolicObjectDoes this symbolic object contain a quantified expression anywhere in its structure?- Specified by:
containsQuantifierin interfaceSymbolicObject- Returns:
trueiff a quantified expression appears somewhere inside this object
-
containsSubobject
Description copied from interface:SymbolicObjectDoes this symbolic object contain a sub-object equal to the given one?- Specified by:
containsSubobjectin interfaceSymbolicObject- Returns:
trueiff this contains a sub-object equal toobj
-