org.jscience.ml.openmath
Class OMVariable

java.lang.Object
  extended by org.jscience.ml.openmath.OMObject
      extended by org.jscience.ml.openmath.OMVariable
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class OMVariable
extends OMObject

Models an OpenMath variable.

See Also:
"The OpenMath standard 2.0, 2.1.1", Serialized Form

Field Summary
 
Fields inherited from class org.jscience.ml.openmath.OMObject
attributes
 
Constructor Summary
OMVariable()
          Constructor.
OMVariable(java.lang.String newName)
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Clones the object (shallow copy).
 java.lang.Object copy()
          Copies the object (full copy).
 java.lang.String getName()
          Gets the name.
 java.lang.String getType()
          Gets the type.
 boolean isAtom()
          Is this an atom object.
 boolean isComposite()
          Is this a composite object.
 boolean isSame(OMObject object)
          Determines if this is the same object.
 boolean isValid()
          Determines if this is a valid object.
 void setName(java.lang.String newName)
          Sets the name.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class org.jscience.ml.openmath.OMObject
getAttribute, getAttributes, removeAttribute, setAttribute, setAttributes
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OMVariable

public OMVariable()
Constructor.


OMVariable

public OMVariable(java.lang.String newName)
Constructor.

Parameters:
newName - set the name.
Method Detail

getName

public java.lang.String getName()
Gets the name.

Returns:
the name.

setName

public void setName(java.lang.String newName)
Sets the name.

Parameters:
newName - set the variable name.

getType

public java.lang.String getType()
Gets the type.

Specified by:
getType in class OMObject
Returns:
the type of the object.

isAtom

public boolean isAtom()
Is this an atom object.

Specified by:
isAtom in class OMObject
Returns:
if we are an atomic object.

isComposite

public boolean isComposite()
Is this a composite object.

Specified by:
isComposite in class OMObject
Returns:
if we are a composite object.

toString

public java.lang.String toString()
Returns a string representation of the object.

Specified by:
toString in class OMObject
Returns:
a string representation.

clone

public java.lang.Object clone()
Clones the object (shallow copy).

Specified by:
clone in class OMObject
Returns:
a shallow copy.

copy

public java.lang.Object copy()
Copies the object (full copy).

Specified by:
copy in class OMObject
Returns:
a full copy.

isSame

public boolean isSame(OMObject object)
Determines if this is the same object.

Specified by:
isSame in class OMObject
Parameters:
object - the object to test against.
Returns:
true if the object is the same, false if it is not.

isValid

public boolean isValid()
Determines if this is a valid object.

Specified by:
isValid in class OMObject
Returns:
true if the object is valid, false if it is not.