Class OMError
java.lang.Object
org.episteme.core.mathematics.loaders.openmath.OMObject
org.episteme.core.mathematics.loaders.openmath.OMError
- All Implemented Interfaces:
Serializable, Cloneable
Models an OpenMath error object.
- Version:
- $Revision: 1.2 $
- Author:
- Manfred N. Riem (mriem@manorrock.org)
- See Also:
-
Field Summary
FieldsFields inherited from class OMObject
attributes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddElement(OMObject object) Add element.clone()Clones the object (shallow copy).copy()Copies the object (deep copy).Get the first element.getElementAt(int index) Get element.Get the elements.Gets the symbol.getType()Gets the type.voidinsertElementAt(OMObject object, int index) Insert element at.booleanisAtom()Are we an atom object.booleanAre we a composite object.booleanDetermines if this is the same object.booleanisValid()Determines if this is a valid object.Get the last element.voidRemove all elements.booleanremoveElement(OMObject object) Remove element.voidremoveElementAt(int index) Remove element at.Replace any occurrence of source to destination.voidsetElementAt(OMObject object, int index) Set element.voidsetElements(Vector<OMObject> newElements) Set the elements.voidSet the symbol.toString()toString.Methods inherited from class OMObject
getAttribute, getAttributes, removeAttribute, setAttribute, setAttributes
-
Field Details
-
symbol
Stores the symbol. -
elements
-
-
Constructor Details
-
OMError
-
OMError
public OMError()Constructor.
-
-
Method Details
-
getType
-
setSymbol
Set the symbol.- Parameters:
newSymbol- the error symbol to set.
-
getSymbol
-
getElements
-
setElements
-
getElementAt
Get element.- Parameters:
index- the index of the element to get.- Returns:
- the element at the given index.
-
setElementAt
Set element.- Parameters:
object- the object to set.index- the index to set at.
-
insertElementAt
Insert element at.- Parameters:
object- the object to insert.index- the index to insert at.
-
removeElementAt
public void removeElementAt(int index) Remove element at.- Parameters:
index- the index to remove the object from.
-
addElement
-
removeElement
Remove element.
Note: This removes the first occurence of the given element. If you want to remove all the references to the given object, continue remove until this returns false.- Parameters:
object- the object to remove.- Returns:
- true if more objects exist, false otherwise.
-
removeAllElements
public void removeAllElements()Remove all elements. -
firstElement
-
lastElement
-
toString
-
clone
-
copy
-
isComposite
public boolean isComposite()Are we a composite object.- Specified by:
isCompositein classOMObject- Returns:
- true because we are a composite object.
-
isAtom
-
isSame
-
isValid
-
replace
-