public class MolContext extends 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 |
---|---|
Object |
callback(String method,
Object arg)
Implements
CallbackIface . |
void |
clear()
Clears the context.
|
String[] |
getContextFunctionNames()
Returns {"mol", "fingerprint"}.
|
int[] |
getFingerprint()
Returns the input molecule fingerprint.
|
protected int[] |
getFingerprint(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.
|
public MolContext()
public MolContext(Molecule m)
public String[] getContextFunctionNames()
getContextFunctionNames
in interface ChemContext
public Object callback(String method, 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 Molecule getMolecule()
public void setFingerprint(int[] fingerprint)
fingerprint
- is the fingerprintpublic int[] getFingerprint()
protected int[] getFingerprint(Object arg)
null
otherwise.arg
- is the argument to be checked against the input moleculenull
public void clear()
clear
in interface ChemContext