Package chemaxon.jep.context
Class AtomContext
- java.lang.Object
-
- chemaxon.jep.context.MolContext
-
- chemaxon.jep.context.AtomContext
-
- All Implemented Interfaces:
ChemContext
,chemaxon.marvin.util.CallbackIface
,Serializable
@PublicAPI public class AtomContext extends MolContext
Expression evaluation context containing an input molecule and an input atom. Provides function names for accessing context elements through theCallbackIface
.- Since:
- JChem 2.2, Marvin 5.1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AtomContext()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
callback(String method, Object arg)
ImplementsCallbackIface
.void
clear()
Clears the context.int
getAtom()
Returns the input atom index.String[]
getContextFunctionNames()
Returns {"mol", "fingerprint", "atom"}.void
setAtom(int atom)
Sets the input atom.-
Methods inherited from class chemaxon.jep.context.MolContext
getFingerprint, getFingerprint, getMolecule, setFingerprint, setMolecule, setSupplier
-
-
-
-
Field Detail
-
CFNS
public static String[] CFNS
The context function names.
-
-
Method Detail
-
getContextFunctionNames
public String[] getContextFunctionNames()
Returns {"mol", "fingerprint", "atom"}. This is the accessor function name for getting the molecule.- Specified by:
getContextFunctionNames
in interfaceChemContext
- Overrides:
getContextFunctionNames
in classMolContext
- Returns:
- {"mol", "fingerprint", "atom"}
-
callback
public Object callback(String method, Object arg)
ImplementsCallbackIface
. Returnsnull
for unimplemented callbacks. Implemented callbacks:method arg return value "mol" null
the input molecule "fingerprint" null
the input molecule fingerprint "atom" null
the input atom - Specified by:
callback
in interfacechemaxon.marvin.util.CallbackIface
- Specified by:
callback
in interfaceChemContext
- Overrides:
callback
in classMolContext
- Parameters:
method
- is the accessor method namearg
- is the accessor method argument (the JEP parameter stack asnull
, a single parameter object or a parameter object array depending on the number of parameters on the stack)- Returns:
- the context element
-
setAtom
public void setAtom(int atom)
Sets the input atom.- Parameters:
atom
- is the input atom index
-
getAtom
public int getAtom()
Returns the input atom index.- Returns:
- the input atom index
-
clear
public void clear()
Clears the context.- Specified by:
clear
in interfaceChemContext
- Overrides:
clear
in classMolContext
-
-