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
@ProvidesFunction(minParameterCount=0,maxParameterCount=0,names={"atom","mol"}) @ProvidesFunction(minParameterCount=1,maxParameterCount=1,names="fingerprint")
public class AtomContext
extends MolContext
Expression evaluation context containing an input molecule
and an input atom.
- Since:
- JChem 2.2, Marvin 5.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface chemaxon.jep.ChemContext
ChemContext.ProvidesFunction, ChemContext.ProvidesFunctionContainer
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String[]
The context function names.Fields inherited from class chemaxon.jep.context.MolContext
FINGERPRINT, MOL
Fields inherited from interface chemaxon.jep.ChemContext
VARARG
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncallContextFunction
(String name, List<Object> params) Executes the specified context function with the given parameters.void
clear()
Clears the context.int
getAtom()
Returns the input atom index.String[]
Deprecated, for removal: This API element is subject to removal in a future version.void
setAtom
(int atom) Sets the input atom.Methods inherited from class chemaxon.jep.context.MolContext
getFingerprint, getFingerprint, getMolecule, setFingerprint, setMolecule, setSupplier
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface chemaxon.jep.ChemContext
callback, getVariable
-
Field Details
-
ATOM
- See Also:
-
CFNS
The context function names.
-
-
Constructor Details
-
AtomContext
public AtomContext()Constructor.
-
-
Method Details
-
getContextFunctionNames
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public String[] getContextFunctionNames()Deprecated, for removal: This API element is subject to removal in a future version.Use theChemContext.ProvidesFunction
annotation instead.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"}
-
callContextFunction
Executes the specified context function with the given parameters.Implemented functions:
name parameter return value "mol" the input molecule "fingerprint" the input molecule fingerprint "atom" the input atom - Specified by:
callContextFunction
in interfaceChemContext
- Overrides:
callContextFunction
in classMolContext
- Parameters:
name
- the context function name (as specified byChemContext.ProvidesFunction.names()
)params
- the context function parameters. The size of this list must be between theminimum
andmaximum
allowed.- Returns:
- the context element, or null if the given function is not supported
- Throws:
JepException
- on error
-
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
-
ChemContext.ProvidesFunction
annotation instead.