Class OMInteger
java.lang.Object
org.episteme.core.mathematics.loaders.openmath.OMObject
org.episteme.core.mathematics.loaders.openmath.OMInteger
- All Implemented Interfaces:
Serializable, Cloneable
Models an OpenMath integer.
- Version:
- $Revision: 1.3 $
- Author:
- Manfred N. Riem (mriem@manorrock.org)
- See Also:
-
Field Summary
FieldsFields inherited from class OMObject
attributes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones the object (shallow copy).copy()Copies the object (full copy).Get the integer.getType()Gets the type.intintValue()Returns the integer as an int.booleanisAtom()Is this an atom object.booleanIs this a composite object.booleanDetermines if this is the same object.booleanisValid()Determines if this object is valid.longReturn the integer as a long.voidsetInteger(int newInteger) Set the integer.voidsetInteger(long newLong) Set the integer.voidsetInteger(Integer newInteger) Set the integer.voidsetInteger(Long newLong) Set the integer.voidsetInteger(String newInteger) Set the integer.toString()Returns a string representation of the object.Methods inherited from class OMObject
getAttribute, getAttributes, removeAttribute, setAttribute, setAttributes
-
Field Details
-
integer
Stores the integer.
-
-
Constructor Details
-
OMInteger
public OMInteger()Constructor. -
OMInteger
Constructor.- Parameters:
newInteger- the integer to set (as a string).
-
OMInteger
public OMInteger(long newLong) Constructor.- Parameters:
newLong- the long to use for this OpenMath integer.
-
OMInteger
public OMInteger(int newInteger) Constructor.- Parameters:
newInteger- the int to use for this OpenMath integer.
-
OMInteger
Constructor.- Parameters:
newLong- the Long to use for this OpenMath integer.
-
OMInteger
Constructor.- Parameters:
newInteger- the Integer to use for this OpenMath integer.
-
-
Method Details
-
getType
-
setInteger
Set the integer.- Parameters:
newInteger- the integer to set (as string).
-
setInteger
Set the integer.- Parameters:
newLong- the integer to set (as Long).
-
setInteger
Set the integer.- Parameters:
newInteger- the integer to set (as Integer).
-
setInteger
public void setInteger(long newLong) Set the integer.- Parameters:
newLong- the integer to set (as Long).
-
setInteger
public void setInteger(int newInteger) Set the integer.- Parameters:
newInteger- the integer to set (as int).
-
getInteger
-
longValue
public long longValue()Return the integer as a long.- Returns:
- the integer (as long).
-
intValue
public int intValue()Returns the integer as an int.- Returns:
- the integer (as int).
-
isAtom
-
isComposite
public boolean isComposite()Is this a composite object.- Specified by:
isCompositein classOMObject- Returns:
- false because we are not composite.
-
toString
-
clone
-
copy
-
isSame
-
isValid
-