Hilbert II - Version 0.03.01

org.qedeq.kernel.dto.list
Class AtomImpl

java.lang.Object
  extended byorg.qedeq.kernel.dto.list.AtomImpl
All Implemented Interfaces:
Atom, Element

public final class AtomImpl
extends Object
implements Atom

An object of this class represents a text string.

Version:
$Revision: 1.5 $

Constructor Summary
AtomImpl(String text)
          Constructs an Atom.
 
Method Summary
 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.
 ElementList getList()
          Return this element as a Atom.
 String getString()
          Get the text.
 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.
 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

AtomImpl

public AtomImpl(String text)
Constructs an Atom.

Parameters:
text - Atom string.
Throws:
IllegalArgumentException - text is a NullPointer.
Method Detail

getString

public final String getString()
Description copied from interface: Atom
Get the text.

Specified by:
getString in interface Atom
Returns:
text Atom data.

isAtom

public final boolean isAtom()
Description copied from interface: Element
Is this an atom?

Specified by:
isAtom in interface Element
Returns:
true if this is an instance of Atom.

getAtom

public final Atom getAtom()
Description copied from interface: Element
Return this element as an Atom.

Specified by:
getAtom in interface Element
Returns:
This is an instance of Atom.

isList

public final boolean isList()
Description copied from interface: Element
Is this an ElementList?

Specified by:
isList in interface Element
Returns:
true if this is an instance of ElementList.

getList

public final ElementList getList()
Description copied from interface: Element
Return this element as a Atom.

Specified by:
getList in interface Element
Returns:
This as an instance of Atom.

copy

public final Element copy()
Description copied from interface: Element
Returns an identical object (maybe "this").

Specified by:
copy in interface Element
Returns:
Copy of this object.

replace

public final Element replace(Element search,
                             Element replacement)
Description copied from interface: Element
Creates and returns a copy of this object, but replaces anything that Element.equals(java.lang.Object) argument with a Element.copy() of replacement.

Specified by:
replace in interface Element
Parameters:
search - Check for occurrence of this.
replacement - Replace with this.
Returns:
Copy with replacements.

toString

public final String toString()
Description copied from interface: Element
Get show this in String form.

Specified by:
toString in interface Element

equals

public final boolean equals(Object object)
Description copied from interface: Element
Is this object equal to the given one?

Specified by:
equals in interface Element

hashCode

public final int hashCode()
Description copied from interface: Element
Calculates the hash code.

Specified by:
hashCode in interface Element

Hilbert II - Version 0.03.01

©left GNU General Public Licence
All Rights Reserved.