|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector
org.jscience.chemistry.gui.extended.molecule.MoleculeVector
public class MoleculeVector
Tripos MoleculeVector class
Molecule,
Serialized Form| Field Summary |
|---|
| Fields inherited from class java.util.Vector |
|---|
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
MoleculeVector()
Default constructor |
|
MoleculeVector(int cap)
Capacity constructor |
|
MoleculeVector(int cap,
int inc)
Capacity & increment constructor |
|
MoleculeVector(MoleculeVector mv)
Copy constructor. |
|
| Method Summary | |
|---|---|
void |
append(Molecule mol)
Append a molecule to the end of vector |
void |
appendUnique(Molecule mol)
Append a molecule to the end of vector only if the molecule is not already present in the MoleculeVector |
boolean |
equals(MoleculeVector av)
Compares this MoleculeVector with another |
Molecule |
firstMolecule()
Returns first molecule in MoleculeVector |
Molecule |
getMolecule(int i)
Returns molecule at specified index |
void |
insert(Molecule mol,
int i)
Insert a molecule at specified index; other molecules are shifted over |
Molecule |
lastMolecule()
Returns last molecule in MoleculeVector |
boolean |
remove(Molecule mol)
Remove a molecule; other molecules are shifted down |
void |
removeMolecule(int i)
Remove molecule at specified index; other molecules are shifted down |
void |
set(Molecule mol,
int i)
Set a molecule at specified index; molecule at index is replaced |
| Methods inherited from class java.util.Vector |
|---|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
iterator, listIterator, listIterator |
| Constructor Detail |
|---|
public MoleculeVector()
public MoleculeVector(int cap)
cap - initial capacity of vector
public MoleculeVector(int cap,
int inc)
cap - initial capacity of vectorinc - increment factorpublic MoleculeVector(MoleculeVector mv)
mv - MoleculeVector to be copied| Method Detail |
|---|
public final void append(Molecule mol)
mol - molecule to be appendedpublic final void appendUnique(Molecule mol)
mol - molecule to be appended
public final Molecule getMolecule(int i)
throws java.lang.ArrayIndexOutOfBoundsException
i - index of molecule
java.lang.ArrayIndexOutOfBoundsException - if index >= capacity()
public final void set(Molecule mol,
int i)
mol - molecule to be seti - index to place molecule
public final void insert(Molecule mol,
int i)
mol - molecule to be insertedi - index of insertionpublic final boolean remove(Molecule mol)
mol - molecule to be removed
public final void removeMolecule(int i)
throws java.lang.ArrayIndexOutOfBoundsException
i - index of molecule
java.lang.ArrayIndexOutOfBoundsException - if index >= capacity()
public final Molecule firstMolecule()
throws java.util.NoSuchElementException
java.util.NoSuchElementException - if size() == 0
public final Molecule lastMolecule()
throws java.util.NoSuchElementException
java.util.NoSuchElementException - if size() == 0public boolean equals(MoleculeVector av)
av - MoleculeVector to compare with
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||