Class OMForeign

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

public class OMForeign extends OMObject
Models an OpenMath foreign object.

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

    • object

      protected Object object
      Stores the foreign object.

  • Constructor Details

    • OMForeign

      public OMForeign()
      Constructor.

  • Method Details

    • clone

      public Object clone()
      Clones the object.

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

      public 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 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 String toString()
      Returns a string representation.
      Specified by:
      toString in class OMObject
      Returns:
      a string.
    • setObject

      public void setObject(Object object)
      Set the object.

      Parameters:
      object - the object to set.
    • getObject

      public Object getObject()
      Get the object.

      Returns:
      the foreign object