|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.ml.openmath.OMObject
org.jscience.ml.openmath.OMApplication
public class OMApplication
Models an OpenMath application object.
| Field Summary | |
|---|---|
protected java.util.Vector |
elements
Stores the elements. |
| Fields inherited from class org.jscience.ml.openmath.OMObject |
|---|
attributes |
| Constructor Summary | |
|---|---|
OMApplication()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addElement(OMObject object)
Adds an element. |
java.lang.Object |
clone()
Clones the object performing a shallow copy. |
java.lang.Object |
copy()
Copies the object performing a full copy. |
OMObject |
firstElement()
Gets the first element. |
OMObject |
getElementAt(int index)
Gets the element at the given index. |
java.util.Vector |
getElements()
Get the elements. |
int |
getLength()
Get the length of the application (aka the number of elements). |
java.lang.String |
getType()
Gets the type. |
void |
insertElementAt(OMObject object,
int index)
Inserts an 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()
Gets the last element. |
void |
removeAllElements()
Remove all elements. |
boolean |
removeElement(OMObject object)
Removes an element. |
void |
removeElementAt(int index)
Removes an element at. |
OMObject |
replace(OMObject source,
OMObject dest)
Replace any occurrence of source to destination. |
void |
setElementAt(OMObject object,
int index)
Sets an element. |
void |
setElements(java.util.Vector newElements)
Set the elements. |
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 |
|---|
protected java.util.Vector elements
| Constructor Detail |
|---|
public OMApplication()
| Method Detail |
|---|
public java.lang.String getType()
getType in class OMObjectpublic java.lang.String toString()
Note: this is quite similar to the OpenMath XML-encoding, but it is not complete. It returns the OpenMath object without the outer OMOBJ element.
toString in class OMObjectpublic java.lang.Object clone()
Note: a shallow does not create separate copies of the child elements. So if you change anything in one of the child elements you are possibly changing some other object as well.
clone in class OMObjectpublic java.lang.Object copy()
Note: a full copy will create separate copies of all its child elements as well.
copy in class OMObjectpublic boolean isComposite()
isComposite in class OMObjectpublic boolean isAtom()
isAtom in class OMObjectpublic int getLength()
public java.util.Vector getElements()
public void setElements(java.util.Vector newElements)
newElements - a vector with elements.public OMObject getElementAt(int index)
index - the index of the elements to get.
public void setElementAt(OMObject object,
int index)
object - the object.index - the index.
public void insertElementAt(OMObject object,
int index)
object - the object to insert at indexindex - the index to insert at.public void removeElementAt(int index)
index - the index to remove the object.public void addElement(OMObject object)
object - adds an object (at the end).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 to use this method until it returns false.
object - removes the first occurence of the given object.
public void removeAllElements()
public OMObject firstElement()
public OMObject lastElement()
public boolean isSame(OMObject object)
isSame in class OMObjectobject - the object to compare 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 | ||||||||