|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tue.win.riaca.openmath.lang.OMObject
nl.tue.win.riaca.openmath.lang.OMError
Models an OpenMath error object.
Field Summary | |
protected java.util.Vector |
elements
Stores the errors. |
protected OMSymbol |
symbol
Stores the symbol. |
Fields inherited from class nl.tue.win.riaca.openmath.lang.OMObject |
attributes |
Constructor Summary | |
OMError()
Constructor. |
|
OMError(OMSymbol newSymbol)
Constructor. |
Method Summary | |
void |
addElement(OMObject object)
Add element. |
java.lang.Object |
clone()
Clones the object (shallow copy). |
java.lang.Object |
copy()
Copies the object (deep copy). |
OMObject |
firstElement()
Get the first element. |
OMObject |
getElementAt(int index)
Get element. |
java.util.Vector |
getElements()
Get the elements. |
OMSymbol |
getSymbol()
Gets the symbol. |
java.lang.String |
getType()
Gets the type. |
void |
insertElementAt(OMObject object,
int index)
Insert element at. |
boolean |
isAtom()
Are we an atom object. |
boolean |
isComposite()
Are we a composite object. |
boolean |
isSame(OMObject object)
Determines if this is the same object. |
boolean |
isValid()
Determines if this is a valid object. |
OMObject |
lastElement()
Get the last element. |
void |
removeAllElements()
Remove all elements. |
boolean |
removeElement(OMObject object)
Remove element. |
void |
removeElementAt(int index)
Remove element at. |
OMObject |
replace(OMObject source,
OMObject dest)
Replace any occurrence of source to destination. |
void |
setElementAt(OMObject object,
int index)
Set element. |
void |
setElements(java.util.Vector newElements)
Set the elements. |
void |
setSymbol(OMSymbol newSymbol)
Set the symbol. |
java.lang.String |
toString()
toString. |
Methods inherited from class nl.tue.win.riaca.openmath.lang.OMObject |
getAttribute, getAttributes, removeAttribute, setAttribute, setAttributes |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected OMSymbol symbol
protected java.util.Vector elements
Constructor Detail |
public OMError(OMSymbol newSymbol)
newSymbol
- the error symbolpublic OMError()
Method Detail |
public java.lang.String getType()
getType
in class OMObject
public void setSymbol(OMSymbol newSymbol)
newSymbol
- the error symbol to set.public OMSymbol getSymbol()
public java.util.Vector getElements()
public void setElements(java.util.Vector newElements)
newElements
- the elements to set.public OMObject getElementAt(int index)
index
- the index of the element to get.
public void setElementAt(OMObject object, int index)
object
- the object to set.index
- the index to set at.public void insertElementAt(OMObject object, int index)
object
- the object to insert.index
- the index to insert at.public void removeElementAt(int index)
index
- the index to remove the object from.public void addElement(OMObject object)
object
- the object to add.public boolean removeElement(OMObject object)
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.
object
- the object to remove.
public void removeAllElements()
public OMObject firstElement()
public OMObject lastElement()
public java.lang.String toString()
toString
in class OMObject
public java.lang.Object clone()
clone
in class OMObject
public java.lang.Object copy()
copy
in class OMObject
public boolean isComposite()
isComposite
in class OMObject
public boolean isAtom()
isAtom
in class OMObject
public boolean isSame(OMObject object)
isSame
in class OMObject
object
- the object to check against.
public boolean isValid()
isValid
in class OMObject
public OMObject replace(OMObject source, OMObject dest)
source
- the source object.dest
- the destination object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |