Class OMString

java.lang.Object
org.episteme.core.mathematics.loaders.openmath.OMObject
org.episteme.core.mathematics.loaders.openmath.OMString
All Implemented Interfaces:
Serializable, Cloneable

public class OMString extends OMObject
Models an OpenMath string.

Version:
$Revision: 1.3 $
Author:
Manfred N. Riem (mriem@manorrock.org)
See Also:
  • Field Details

    • string

      protected String string
      Stores the string.

  • Constructor Details

    • OMString

      public OMString()
      Constructor.

    • OMString

      public OMString(String newString)
      Constructor.

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

    • getType

      public String getType()
      Gets the type.

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

      public void setString(String newString)
      Sets the string.

      Parameters:
      newString - the string to set.
    • getString

      public 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 String toString()
      toString.

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

      public Object clone()
      Clone the object (shallow copy).
      Specified by:
      clone in class OMObject
      Returns:
      the shallow copy.
    • copy

      public 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.