|
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.BasicElectronCollection
A default implementation of the ElectronCollection interface backed
by an ArraySequence.
| Constructor Summary | |
BasicElectronCollection()
Constructs an empty BasicElectronCollection. |
|
BasicElectronCollection(java.util.Collection electrons)
Constructs a BasicElectronCollection from the elements contained
in electrons. |
|
BasicElectronCollection(Electron[] electrons)
Constructs a BasicElectronCollection from the elements contained
in electrons. |
|
| Method Summary | |
boolean |
containsElectron(Electron electron)
Returns true if the specified Electron is contained in this
collection, and false otherwise. |
int |
countElectrons()
Returns the number of Electrons contained in this collection. |
Electron |
getElectron(int index)
Returns the Electron located at the specified zero-based index. |
int |
getElectronIndex(Electron electron)
Returns the zero-based index of the specified Electron. |
ElectronIterator |
iterateElectrons()
Returns an iterator over all Electrons in this collection. |
Electron[] |
toElectronArray()
Returns a copy of the Electrons 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 BasicElectronCollection()
BasicElectronCollection.
public BasicElectronCollection(java.util.Collection electrons)
BasicElectronCollection from the elements contained
in electrons.
electrons - the collection from which to get Electrons
java.lang.IllegalArgumentException - if electrons contains Objects that
do not implement Electron
java.lang.NullPointerException - if electrons contains nullpublic BasicElectronCollection(Electron[] electrons)
BasicElectronCollection from the elements contained
in electrons.
electrons - the array from which to get Electrons
java.lang.IllegalArgumentException - if electrons contains Objects that
do not implement Electron
java.lang.NullPointerException - if electrons contains null| Method Detail |
public boolean containsElectron(Electron electron)
ElectronCollectiontrue if the specified Electron is contained in this
collection, and false otherwise.
containsElectron in interface ElectronCollectionelectron - the Electron
true if contained, false otherwisepublic int countElectrons()
ElectronCollectionElectrons contained in this collection.
countElectrons in interface ElectronCollectionpublic int getElectronIndex(Electron electron)
ElectronCollectionElectron.
getElectronIndex in interface ElectronCollectionelectron - the atom
electronpublic Electron getElectron(int index)
ElectronCollectionElectron located at the specified zero-based index.
getElectron in interface ElectronCollectionindex - the index
Electron at index, or null
if the index is invalidpublic ElectronIterator iterateElectrons()
ElectronCollectionElectrons in this collection.
iterateElectrons in interface ElectronCollectionElectrons in this collectionpublic Electron[] toElectronArray()
ElectronCollection
toElectronArray in interface ElectronCollection
|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||