|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.octet.collection.BasicAtomCollection
A default implementation of the AtomCollection interface
backed by an ArraySequence.
| Constructor Summary | |
BasicAtomCollection()
Constructs an empty BasicAtomCollection. |
|
BasicAtomCollection(Atom[] atoms)
Constructs a BasicAtomCollection from the elements contained
in atoms. |
|
BasicAtomCollection(java.util.Collection atoms)
Constructs a BasicAtomCollection from the elements contained
in atoms. |
|
| Method Summary | |
boolean |
containsAtom(Atom atom)
Returns true if the specified Atom is contained in this
collection, and false otherwise. |
int |
countAtoms()
Returns the number of Atoms contained in this atom collection. |
Atom |
getAtom(int index)
Returns the Atom located at the specified zero-based index. |
int |
getAtomIndex(Atom atom)
Returns the zero-based index of the specified Atom. |
AtomIterator |
iterateAtoms()
Returns an iterator over all Atoms in this collection. |
Atom[] |
toAtomArray()
Returns a copy of the Atoms contained in this collection as an array. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicAtomCollection()
BasicAtomCollection.
public BasicAtomCollection(java.util.Collection atoms)
BasicAtomCollection from the elements contained
in atoms.
atoms - the collection from which to get Atoms
java.lang.IllegalArgumentException - if atoms contains Objects that
do not implement Atom
java.lang.NullPointerException - if atoms contains nullpublic BasicAtomCollection(Atom[] atoms)
BasicAtomCollection from the elements contained
in atoms.
atoms - the array from which to get Atoms
java.lang.IllegalArgumentException - if atoms contains Objects that
do not implement Atom
java.lang.NullPointerException - if atoms contains null| Method Detail |
public boolean containsAtom(Atom atom)
AtomCollectiontrue if the specified Atom is contained in this
collection, and false otherwise.
containsAtom in interface AtomCollectionatom - the Atom
true if contained, false otherwisepublic int countAtoms()
AtomCollectionAtoms contained in this atom collection.
countAtoms in interface AtomCollectionpublic int getAtomIndex(Atom atom)
AtomCollectionAtom.
getAtomIndex in interface AtomCollectionatom - the atom
atompublic Atom getAtom(int index)
AtomCollectionAtom located at the specified zero-based index.
getAtom in interface AtomCollectionindex - the index
Atom at index, or null
if the index is invalidpublic AtomIterator iterateAtoms()
AtomCollectionAtoms in this collection.
iterateAtoms in interface AtomCollectionAtoms in this collectionpublic Atom[] toAtomArray()
AtomCollection
toAtomArray in interface AtomCollection
|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||