no.uio.labmed.molecule
Class CompoundElement

java.lang.Object
  |
  +--no.uio.labmed.molecule.MolecularElement
        |
        +--no.uio.labmed.molecule.CompoundElement
Direct Known Subclasses:
AminoAcidElement, SimpleCompoundElement, SimpleElement

public class CompoundElement
extends MolecularElement

Defines a general compound molecule: a compound of general molecular structure (see MolecularStructure). As such, it extends MolecularElement.


Nested Class Summary
 class CompoundElement.SubElement
          Container for element and index number for an element in a compound: ie. the compound is a list of subelements, which in turn refere to an element and its index in the list.
 
Constructor Summary
CompoundElement(java.lang.String name)
           
CompoundElement(java.lang.String name, MolecularType type)
           
CompoundElement(java.lang.String name, MolecularType type, java.lang.String description)
           
 
Method Summary
 CompoundElement.SubElement addElement(MolecularElement element)
           
 CompoundElement.SubElement addElement(MolecularElement element, java.lang.String tag)
           
 CompoundElement.SubElement addElementAndTags(CompoundElement element)
           
 MolecularElement getElement(int i)
           
 MolecularElement getElement(java.lang.String tag)
           
 MolecularElement getFinalElement(java.lang.String tag)
           
 Molecule getNew()
           
 CompoundElement.SubElement getSubElement(java.lang.String tag)
           
 boolean isAtom()
           
 java.util.Iterator keyIterator()
           
 int size()
           
 int subsize()
           
 int thissize()
           
 
Methods inherited from class no.uio.labmed.molecule.MolecularElement
get, getDescription, getName, getType, map, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompoundElement

public CompoundElement(java.lang.String name)

CompoundElement

public CompoundElement(java.lang.String name,
                       MolecularType type)

CompoundElement

public CompoundElement(java.lang.String name,
                       MolecularType type,
                       java.lang.String description)
Method Detail

isAtom

public final boolean isAtom()
Specified by:
isAtom in class MolecularElement

size

public int size()
Specified by:
size in class MolecularElement

subsize

public int subsize()
Specified by:
subsize in class MolecularElement

thissize

public int thissize()
Specified by:
thissize in class MolecularElement

getNew

public Molecule getNew()
Specified by:
getNew in class MolecularElement

addElement

public CompoundElement.SubElement addElement(MolecularElement element)

addElement

public CompoundElement.SubElement addElement(MolecularElement element,
                                             java.lang.String tag)

addElementAndTags

public CompoundElement.SubElement addElementAndTags(CompoundElement element)

getElement

public MolecularElement getElement(int i)

getElement

public MolecularElement getElement(java.lang.String tag)

getSubElement

public CompoundElement.SubElement getSubElement(java.lang.String tag)

getFinalElement

public MolecularElement getFinalElement(java.lang.String tag)

keyIterator

public java.util.Iterator keyIterator()