@PublicAPI public class MolContext extends java.lang.Object implements ChemContext
CallbackIface
.Constructor and Description |
---|
MolContext()
Constructor.
|
MolContext(Molecule m)
Creates a MolContext with the given input molecule.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
callback(java.lang.String method,
java.lang.Object arg)
Implements
CallbackIface . |
void |
clear()
Clears the context.
|
java.lang.String[] |
getContextFunctionNames()
Returns {"mol", "fingerprint"}.
|
int[] |
getFingerprint()
Returns the input molecule fingerprint.
|
protected int[] |
getFingerprint(java.lang.Object arg)
Returns the input molecule fingerprint if argument is the input molecule,
null otherwise. |
Molecule |
getMolecule()
Returns the input molecule.
|
void |
setFingerprint(int[] fingerprint)
Sets the fingerprint of the input molecule.
|
void |
setMolecule(Molecule mol)
Sets the input molecule.
|
void |
setSupplier(com.google.common.base.Supplier<Molecule> supplier) |
public MolContext()
public MolContext(Molecule m)
public java.lang.String[] getContextFunctionNames()
getContextFunctionNames
in interface ChemContext
public java.lang.Object callback(java.lang.String method, java.lang.Object arg)
CallbackIface
.
Returns null
for unimplemented callbacks.
Implemented callbacks:
method | arg | return value |
---|---|---|
"mol" | null | the input molecule |
"fingerprint" | null | the input molecule fingerprint |
callback
in interface ChemContext
callback
in interface chemaxon.marvin.util.CallbackIface
method
- is the accessor method namearg
- is the accessor method argument (the JEP parameter stack as null
,
a single parameter object or a parameter object array depending on the number
of parameters on the stack)public void setMolecule(Molecule mol)
mol
- is the input moleculepublic void setSupplier(com.google.common.base.Supplier<Molecule> supplier)
public Molecule getMolecule()
public void setFingerprint(int[] fingerprint)
fingerprint
- is the fingerprintpublic int[] getFingerprint()
protected int[] getFingerprint(java.lang.Object arg)
null
otherwise.arg
- is the argument to be checked against the input moleculenull
public void clear()
clear
in interface ChemContext