org.jscience.ml.openmath
Class OMByteArray

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

public class OMByteArray
extends OMObject

Models an OpenMath byte array.

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

Field Summary
protected  byte[] byteArray
          Stores the byte array.
 
Fields inherited from class org.jscience.ml.openmath.OMObject
attributes
 
Constructor Summary
OMByteArray()
          Constructor.
OMByteArray(java.lang.String newByteArray)
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Clones the object (shallow copy).
 java.lang.Object copy()
          Copies the object (full copy).
 byte[] getByteArray()
          Gets the byte array.
 java.lang.String getByteArrayAsString()
          Get the byte array as 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 is a valid object.
 void setByteArray(byte[] newByteArray)
          Sets the byte array.
 void setByteArray(java.lang.String newByteArray)
          Sets the byte array.
 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
 

Field Detail

byteArray

protected byte[] byteArray
Stores the byte array.

Constructor Detail

OMByteArray

public OMByteArray()
Constructor.


OMByteArray

public OMByteArray(java.lang.String newByteArray)
Constructor.

Method Detail

getType

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

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

setByteArray

public void setByteArray(java.lang.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 java.lang.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 java.lang.String toString()
Returns a string representation of the object.

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

clone

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

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

copy

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