|
Hilbert II - Version 0.03.09 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.qedeq.kernel.dto.list.DefaultElementList
Every Operator must inherit from this class. Its main function is to
provide the standard implementation of equals(java.lang.Object)
and hashCode().
| Constructor Summary | |
DefaultElementList(String operator,
Element[] elements)
Constructs a element list. |
|
| Method Summary | |
void |
add(Element element)
Adds an element to end of list. |
Element |
copy()
Returns an identical object (maybe "this"). |
boolean |
equals(Object object)
Is this object equal to the given one? |
Atom |
getAtom()
Return this element as an Atom. |
Element |
getElement(int i)
Get the requested argument. |
List |
getElements()
Get all arguments as an list. |
ElementList |
getList()
Return this element as a Atom. |
String |
getOperator()
Get the operator. |
int |
hashCode()
Calculates the hash code. |
void |
insert(int position,
Element element)
Inserts an element to specified position. |
boolean |
isAtom()
Is this an atom? |
boolean |
isList()
Is this an ElementList? |
void |
remove(int i)
Deletes an element of element list. |
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. |
void |
replace(int position,
Element element)
Replaces an element at specified position. |
int |
size()
Get the number of arguments. |
String |
toString()
Get show this in String form. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DefaultElementList(String operator,
Element[] elements)
operator - Operator name.elements - the elements to make a list of
IllegalArgumentException - Element or operator was a NullPointer.| Method Detail |
public final boolean isAtom()
Element
isAtom in interface Elementtrue if this is an instance of Atom.public final Atom getAtom()
ElementAtom.
getAtom in interface ElementAtom.public final boolean isList()
ElementElementList?
isList in interface Elementtrue if this is an instance of ElementList.public final ElementList getList()
Element
getList in interface ElementAtom.public final String getOperator()
ElementList
getOperator in interface ElementListpublic final int size()
ElementList
size in interface ElementListpublic final Element getElement(int i)
ElementList
getElement in interface ElementListi - Number of argument (starting with 0).
i-th part formula.public final List getElements()
ElementList
getElements in interface ElementListpublic final boolean equals(Object object)
Element
equals in interface Elementpublic final Element copy()
Element
copy in interface Element
public final Element replace(Element search,
Element replacement)
ElementElement.equals(java.lang.Object) argument
with a Element.copy() of replacement.
replace in interface Elementsearch - Check for occurrence of this.replacement - Replace with this.
public final void add(Element element)
ElementList
add in interface ElementListelement - Element to add.
public final void insert(int position,
Element element)
ElementList
insert in interface ElementListposition - Position of element to add.element - Element to add.
public final void replace(int position,
Element element)
ElementList
replace in interface ElementListposition - Position of element to replace.element - Replacement element.public final void remove(int i)
ElementList
remove in interface ElementListi - Position of element to remove.public final int hashCode()
Element
hashCode in interface Elementpublic final String toString()
ElementString form.
toString in interface Element
|
Hilbert II - Version 0.03.09 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| ©left GNU General Public Licence All Rights Reserved. |