Package org.openscience.cdk.smiles
Class InvPair
- java.lang.Object
-
- org.openscience.cdk.smiles.InvPair
-
- All Implemented Interfaces:
Serializable
public class InvPair extends Object implements Serializable
This is used to hold the invariance numbers for the canonical labeling ofIAtomContainer
s.- See Also:
- Serialized Form
- Source code:
- main
- Belongs to CDK module:
- standard
-
-
Field Summary
Fields Modifier and Type Field Description static String
CANONICAL_LABEL
static String
INVARIANCE_PAIR
The description used to set the invariance numbers in the atom's property
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
commit()
boolean
equals(Object object)
Check whether this instance equals another instance.IAtom
getAtom()
long
getCurr()
Get the current seed.long
getLast()
int
getPrime()
Get the current prime number.int
hashCode()
void
setAtom(IAtom newAtom)
void
setCurr(long newCurr)
Set the value of the seed.void
setLast(long newLast)
void
setPrime()
Sets the prime number based on the current seed.String
toString()
String representation.
-
-
-
Field Detail
-
INVARIANCE_PAIR
public static final String INVARIANCE_PAIR
The description used to set the invariance numbers in the atom's property- See Also:
- Constant Field Values
-
CANONICAL_LABEL
public static final String CANONICAL_LABEL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InvPair
public InvPair()
-
InvPair
public InvPair(long current, IAtom atom)
-
-
Method Detail
-
getLast
public long getLast()
-
setCurr
public void setCurr(long newCurr)
Set the value of the seed. Note that use of this method implies that a new prime number is desired. If so, make sure to callsetPrime()
to ensure that a new prime number is obtained using the new seed. Todo make the following robust!- See Also:
getCurr()
,setPrime()
-
getCurr
public long getCurr()
Get the current seed.- Returns:
- The seed
- See Also:
setCurr(long)
,setPrime()
,getPrime()
-
equals
public boolean equals(Object object)
Check whether this instance equals another instance.
-
setLast
public void setLast(long newLast)
-
setAtom
public void setAtom(IAtom newAtom)
-
getAtom
public IAtom getAtom()
-
commit
public void commit()
-
toString
public String toString()
String representation.
-
getPrime
public int getPrime()
Get the current prime number.- Returns:
- The current prime number
- See Also:
setPrime()
-
setPrime
public void setPrime()
Sets the prime number based on the current seed. Note that if you change the seed viasetCurr(long)
, you should make sure to call this method so that a new prime number is available viagetPrime()
- See Also:
setCurr(long)
,getPrime()
-
-