|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Element
An element is either a list or an atom. Each list has an operator and contains elements which are also elements. A list has a size and their elements can be accessed by their position. An atom carries textual data, has no operator and no size in the previous sense.
| Method Summary | |
|---|---|
Element |
copy()
Returns an identical object. |
boolean |
equals(java.lang.Object object)
Is this object equal to the given one? |
Atom |
getAtom()
Return this element as an Atom. |
ElementList |
getList()
Return this element as an ElementList. |
int |
hashCode()
Calculates the hash code. |
boolean |
isAtom()
Is this an atom? |
boolean |
isList()
Is this an ElementList? |
Element |
replace(Element search,
Element replacement)
Creates and returns a copy of this object, but replaces anything that equals(java.lang.Object) argument
with a copy() of replacement. |
java.lang.String |
toString()
Get show this in String form. |
| Method Detail |
|---|
boolean isAtom()
true if this is an instance of Atom.Atom getAtom()
Atom.
Atom.
java.lang.ClassCastException - This is no instance of Atom.boolean isList()
ElementList?
true if this is an instance of ElementList.ElementList getList()
ElementList.
java.lang.ClassCastException - This is no instance of ElementList.boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - to compare with
object equal to this one?int hashCode()
hashCode in class java.lang.ObjectElement copy()
Element replace(Element search,
Element replacement)
equals(java.lang.Object) argument
with a copy() of replacement.
search - Check for occurrence of this.replacement - Replace with this.
java.lang.String toString()
String form.
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||