org.jscience.ml.openmath
Class OMString

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

public class OMString
extends OMObject

Models an OpenMath string.

See Also:
Serialized Form

Field Summary
protected  java.lang.String string
          Stores the string.
 
Fields inherited from class org.jscience.ml.openmath.OMObject
attributes
 
Constructor Summary
OMString()
          Constructor.
OMString(java.lang.String newString)
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Clone the object (shallow copy).
 java.lang.Object copy()
          Copies the object (deep copy).
 java.lang.String getString()
          Gets the string.
 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 object is valid.
 void setString(java.lang.String newString)
          Sets the string.
 java.lang.String toString()
          toString.
 
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
 

Field Detail

string

protected java.lang.String string
Stores the string.

Constructor Detail

OMString

public OMString()
Constructor.


OMString

public OMString(java.lang.String newString)
Constructor.

Parameters:
newString - the Java string to associate with thie OpenMath object.
Method Detail

getType

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

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

setString

public void setString(java.lang.String newString)
Sets the string.

Parameters:
newString - the string to set.

getString

public java.lang.String getString()
Gets the string.

Returns:
the string.

isAtom

public boolean isAtom()
Is this an atom object.

Specified by:
isAtom in class OMObject
Returns:
true because it is an atom.

isComposite

public boolean isComposite()
Is this a composite object.

Specified by:
isComposite in class OMObject
Returns:
false because it is not composite.

toString

public java.lang.String toString()
toString.

Specified by:
toString in class OMObject
Returns:
the normal string representation.

clone

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

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

copy

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

Specified by:
copy in class OMObject
Returns:
the deep 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 it is the same, false if it is not.

isValid

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

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