Package org.openscience.cdk.signature
Class Orbit
- java.lang.Object
-
- org.openscience.cdk.signature.Orbit
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAtom(int atomIndex)
Adds an atom index to the orbit.Object
clone()
boolean
contains(int atomIndex)
Checks to see if the orbit contains this atom index.List<Integer>
getAtomIndices()
Gets all the atom indices as a list.int
getFirstAtom()
Gets the first atom index of the orbit.int
getHeight()
Gets the height of the signature label.String
getLabel()
Gets the label of the orbit.boolean
hasLabel(String otherLabel)
Checks to see if the orbit has this string as a label.boolean
isEmpty()
Checks to see if the orbit is empty.Iterator<Integer>
iterator()
void
remove(int atomIndex)
Removes an atom index from the orbit.void
sort()
Sorts the atom indices in this orbit.String
toString()
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
Orbit
public Orbit(String label, int height)
- Parameters:
label
-height
-
-
-
Method Detail
-
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
public List<Integer> 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
public boolean hasLabel(String otherLabel)
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
public String 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
-
-