chemaxon.jep.context
Class AtomContext

java.lang.Object
  extended by chemaxon.jep.ChemContext
      extended by chemaxon.jep.context.MolContext
          extended by chemaxon.jep.context.AtomContext
All Implemented Interfaces:
chemaxon.marvin.util.CallbackIface, java.io.Serializable

public class AtomContext
extends MolContext

Expression evaluation context containing an input molecule and an input atom. Provides function names for accessing context elements through the CallbackIface.

Since:
JChem 2.2, Marvin 5.1
Author:
Nora Mate
See Also:
Serialized Form

Field Summary
static java.lang.String[] CFNS
          The context function names.
 
Constructor Summary
AtomContext()
          Constructor.
 
Method Summary
 java.lang.Object callback(java.lang.String method, java.lang.Object arg)
          Implements CallbackIface.
 void clear()
          Clears the context.
 int getAtom()
          Returns the input atom index.
 java.lang.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CFNS

public static java.lang.String[] CFNS
The context function names.

Constructor Detail

AtomContext

public AtomContext()
Constructor.

Method Detail

getContextFunctionNames

public java.lang.String[] getContextFunctionNames()
Returns {"mol", "fingerprint", "atom"}. This is the accessor function name for getting the molecule.

Overrides:
getContextFunctionNames in class MolContext
Returns:
{"mol", "fingerprint", "atom"}

callback

public java.lang.Object callback(java.lang.String method,
                                 java.lang.Object arg)
Implements CallbackIface. Returns null for unimplemented callbacks. Implemented callbacks:
methodargreturn value
"mol"nullthe input molecule
"fingerprint"nullthe input molecule fingerprint
"atom"nullthe input atom

Specified by:
callback in interface chemaxon.marvin.util.CallbackIface
Overrides:
callback in class MolContext
Parameters:
method - is the accessor method name
arg - 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)
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.

Overrides:
clear in class MolContext