The Octet Molecular Representation Framework v0.8.2

net.sf.octet.collection
Interface AtomicSymbolCollection

All Known Subinterfaces:
AtomicSystem
All Known Implementing Classes:
BasicAtomicSymbolCollection, BasicAtomicSystem

public interface AtomicSymbolCollection

An immutable collection of AtomicSymbols. Any AtomicSymbol may be present, but null is disallowed.

Author:
Richard Apodaca

Method Summary
 boolean containsAtomicSymbol(AtomicSymbol symbol)
          Returns true if the specified AtomicSymbol is contained in this collection, and false otherwise.
 int countAtomicSymbols()
          Returns the number of AtomicSymbols contained in this collection.
 AtomicSymbol getAtomicSymbol(int index)
          Returns the AtomicSymbol located at the specified zero-based index.
 int getAtomicSymbolIndex(AtomicSymbol symbol)
          Returns the zero-based index of the specified AtomicSymbol.
 AtomicSymbolIterator iterateAtomicSymbols()
          Returns an iterator over all AtomicSymbols in this collection.
 AtomicSymbol[] toAtomicSymbolArray()
          Returns a copy of the AtomicSymbols contained in this collection as an array.
 

Method Detail

containsAtomicSymbol

public boolean containsAtomicSymbol(AtomicSymbol symbol)
Returns true if the specified AtomicSymbol is contained in this collection, and false otherwise.

Parameters:
symbol - the AtomicSymbol
Returns:
true if contained, false otherwise

countAtomicSymbols

public int countAtomicSymbols()
Returns the number of AtomicSymbols contained in this collection.

Returns:
the number of AtomicSymbols in this collection

getAtomicSymbolIndex

public int getAtomicSymbolIndex(AtomicSymbol symbol)
Returns the zero-based index of the specified AtomicSymbol.

Parameters:
symbol - the AtomicSymbol
Returns:
the index of the AtomicSymbol, or -1 if this collection does not contain symbol

getAtomicSymbol

public AtomicSymbol getAtomicSymbol(int index)
Returns the AtomicSymbol located at the specified zero-based index.

Parameters:
index - the index
Returns:
the AtomicSymbol at index, or null if the index is invalid
Throws:
java.lang.IndexOutOfBoundsException - if index is less than zero or greater than or equal to the number of AtomicSymbols

iterateAtomicSymbols

public AtomicSymbolIterator iterateAtomicSymbols()
Returns an iterator over all AtomicSymbols in this collection.

Returns:
an iterator over all AtomicSymbols in this collection

toAtomicSymbolArray

public AtomicSymbol[] toAtomicSymbolArray()
Returns a copy of the AtomicSymbols contained in this collection as an array. The resulting array may be modified without changing the state of this collection.

Returns:
a copy of the AtomicSymbol array for this collection

The Octet Molecular Representation Framework v0.8.2