Class OMByteArray

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

public class OMByteArray extends OMObject
Models an OpenMath byte array.

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

    • byteArray

      protected byte[] byteArray
      Stores the byte array.

  • Constructor Details

    • OMByteArray

      public OMByteArray()
      Constructor.

    • OMByteArray

      public OMByteArray(String newByteArray)
      Constructor.

  • Method Details

    • getType

      public String getType()
      Gets the type.

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

      public void setByteArray(String newByteArray)
      Sets the byte array.

      Parameters:
      newByteArray - the byte array to set (as string).
    • setByteArray

      public void setByteArray(byte[] newByteArray)
      Sets the byte array.

      Parameters:
      newByteArray - the byte array to set (as byte[]).
    • getByteArray

      public byte[] getByteArray()
      Gets the byte array.

      Returns:
      the byte array.
    • getByteArrayAsString

      public String getByteArrayAsString()
      Get the byte array as string.

      Returns:
      the byte array (as string).
    • isAtom

      public boolean isAtom()
      Is this an atom object.

      Specified by:
      isAtom in class OMObject
      Returns:
      true because we are an atom.
    • isComposite

      public boolean isComposite()
      Is this a composite object.

      Specified by:
      isComposite in class OMObject
      Returns:
      false because we are not composite.
    • toString

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

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

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

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

      Specified by:
      copy in class OMObject
      Returns:
      the 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 it is the same, false otherwise.
    • isValid

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

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