|
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.BasicNucleusCollection
A default implementation of the NucleusCollection interface backed by
a ArraySequence.
| Constructor Summary | |
BasicNucleusCollection()
Constructs an empty BasicNucleusCollection. |
|
BasicNucleusCollection(java.util.Collection nuclei)
Constructs a BasicNucleusCollection from the elements contained
in nuclei. |
|
BasicNucleusCollection(Nucleus[] nuclei)
Constructs a BasicNucleusCollection from the elements contained
in nuclei. |
|
| Method Summary | |
boolean |
containsNucleus(Nucleus nucleus)
Returns true if the specified Nucleus is contained in this
collection, and false otherwise. |
int |
countNuclei()
Returns the number of Nuclei contained in this collection. |
Nucleus |
getNucleus(int index)
Returns the isotope located at the specified zero-based index. |
int |
getNucleusIndex(Nucleus nucleus)
Returns the zero-based index of the specified Nucleus. |
NucleusIterator |
iterateNuclei()
Returns an iterator over all Nuclei in this collection. |
Nucleus[] |
toNucleusArray()
Returns a copy of the Nuclei 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 BasicNucleusCollection()
BasicNucleusCollection.
public BasicNucleusCollection(java.util.Collection nuclei)
BasicNucleusCollection from the elements contained
in nuclei.
nuclei - the collection from which to get Nuclei
java.lang.IllegalArgumentException - if nuclei contains Objects that
do not implement Nucleus
java.lang.NullPointerException - if nuclei contains nullpublic BasicNucleusCollection(Nucleus[] nuclei)
BasicNucleusCollection from the elements contained
in nuclei.
nuclei - the array from which to get Nuclei
java.lang.IllegalArgumentException - if nuclei contains Objects that
do not implement Nucleus
java.lang.NullPointerException - if nuclei contains null| Method Detail |
public boolean containsNucleus(Nucleus nucleus)
NucleusCollectiontrue if the specified Nucleus is contained in this
collection, and false otherwise.
containsNucleus in interface NucleusCollectionnucleus - the Nucleus
true if contained, false otherwisepublic int countNuclei()
NucleusCollectionNuclei contained in this collection.
countNuclei in interface NucleusCollectionpublic int getNucleusIndex(Nucleus nucleus)
NucleusCollectionNucleus.
getNucleusIndex in interface NucleusCollectionnucleus - the nucleus
nucleuspublic Nucleus getNucleus(int index)
NucleusCollectionisotope located at the specified zero-based index.
getNucleus in interface NucleusCollectionindex - the index
Nucleus at index, or null
if the index is invalidpublic NucleusIterator iterateNuclei()
NucleusCollectionNuclei in this collection.
iterateNuclei in interface NucleusCollectionNuclei in this collectionpublic Nucleus[] toNucleusArray()
NucleusCollectionNuclei contained in this collection as an
array. The resulting array may be modified without changing the state
of this collection.
toNucleusArray in interface NucleusCollection
|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||