org.jscience.ml.openmath
Class OMForeign

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

public class OMForeign
extends OMObject

Models an OpenMath foreign object.

See Also:
Serialized Form

Field Summary
protected  java.lang.Object object
          Stores the foreign object.
 
Fields inherited from class org.jscience.ml.openmath.OMObject
attributes
 
Constructor Summary
OMForeign()
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Clones the object.
 java.lang.Object copy()
          Copies the object.
 java.lang.Object getObject()
          Get the object.
 java.lang.String getType()
          Returns the type of the object.
 boolean isAtom()
          Returns if this is an atom.
 boolean isComposite()
          Returns if this is a composite.
 boolean isSame(OMObject object)
          Returns if this is the same object.
 boolean isValid()
          Returns if the OMForeign is valid.
 void setObject(java.lang.Object object)
          Set the object.
 java.lang.String toString()
          Returns a string representation.
 
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

object

protected java.lang.Object object
Stores the foreign object.

Constructor Detail

OMForeign

public OMForeign()
Constructor.

Method Detail

clone

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

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

copy

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

Note: the copy method of this object does NOT deep copy the foreign object. It does basically the same thing as clone. This behavior is intended. If you want a copy of the foreign object you will have to make your own copy!

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

getType

public java.lang.String getType()
Returns the type of the object.

Specified by:
getType in class OMObject
Returns:
the type

isAtom

public boolean isAtom()
Returns if this is an atom.

Specified by:
isAtom in class OMObject
Returns:
true if an atom, false if not.

isComposite

public boolean isComposite()
Returns if this is a composite.

Specified by:
isComposite in class OMObject
Returns:
true if an composite, false if not.

isSame

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

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

isValid

public boolean isValid()
Returns if the OMForeign is valid.

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

toString

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

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

setObject

public void setObject(java.lang.Object object)
Set the object.

Parameters:
object - the object to set.

getObject

public java.lang.Object getObject()
Get the object.

Returns:
the foreign object