Package org.openscience.cdk.signature
Class Orbit
java.lang.Object
org.openscience.cdk.signature.Orbit
A list of atom indices, and the label of the orbit.
- Author:
- maclean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAtom(int atomIndex) Adds an atom index to the orbit.clone()booleancontains(int atomIndex) Checks to see if the orbit contains this atom index.Gets all the atom indices as a list.intGets the first atom index of the orbit.intGets the height of the signature label.getLabel()Gets the label of the orbit.booleanChecks to see if the orbit has this string as a label.booleanisEmpty()Checks to see if the orbit is empty.iterator()voidremove(int atomIndex) Removes an atom index from the orbit.voidsort()Sorts the atom indices in this orbit.toString()Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Orbit
- Parameters:
label-height-
-
-
Method Details
-
iterator
-
clone
-
sort
public void sort()Sorts the atom indices in this orbit. -
getHeight
public int getHeight()Gets the height of the signature label.- Returns:
- the height of the signature of this orbit
-
getAtomIndices
Gets all the atom indices as a list.- Returns:
- the atom indices
-
addAtom
public void addAtom(int atomIndex) Adds an atom index to the orbit.- Parameters:
atomIndex- the atom index
-
hasLabel
Checks to see if the orbit has this string as a label.- Parameters:
otherLabel- the label to compare with- Returns:
- true if it has this label
-
isEmpty
public boolean isEmpty()Checks to see if the orbit is empty.- Returns:
- true if there are no atom indices in the orbit
-
getFirstAtom
public int getFirstAtom()Gets the first atom index of the orbit.- Returns:
- the first atom index
-
remove
public void remove(int atomIndex) Removes an atom index from the orbit.- Parameters:
atomIndex- the atom index to remove
-
getLabel
Gets the label of the orbit.- Returns:
- the orbit's string label
-
contains
public boolean contains(int atomIndex) Checks to see if the orbit contains this atom index.- Parameters:
atomIndex- the atom index to look for- Returns:
- true if the orbit contains this atom index
-
toString
-