Package chemaxon.checkers
Class ValencePropertyChecker
- java.lang.Object
-
- chemaxon.checkers.AbstractStructureChecker
-
- chemaxon.checkers.ComponentChecker<MolAtom>
-
- chemaxon.checkers.AtomChecker
-
- chemaxon.checkers.ValencePropertyChecker
-
- All Implemented Interfaces:
StructureChecker
,chemaxon.license.Licensable
,PropertyChangeListener
,Cloneable
,EventListener
@PublicAPI public class ValencePropertyChecker extends AtomChecker
A descendant ofAtomChecker
detecting atoms having an explicitly set valence property.- Since:
- Marvin 5.6
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROPERTY_KEY_DEFAULT_VALENCE
Search for valence properties that are equal to the default valence.static String
PROPERTY_KEY_NON_DEFAULT_VALENCE
Search for valence properties that are not equal to the default valence.static String
PROPERTY_KEY_SEARCH_DEFAULT_VALENCE
Search default valence propertystatic String
PROPERTY_KEY_SEARCH_NON_DEFAULT_VALENCE
Search non default valence property-
Fields inherited from class chemaxon.checkers.AbstractStructureChecker
errorType, propertyChangeSupport
-
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
-
-
Constructor Summary
Constructors Constructor Description ValencePropertyChecker()
Creates a new ValencePropertyChecker instance.ValencePropertyChecker(Map<String,String> params)
Creates a new ValencePropertyChecker instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
check(Molecule molecule, MolAtom component)
Checks if the component with index i has problemboolean
equals(Object obj)
int
hashCode()
boolean
isSearchDefaultValence()
Returns if the checker detects valence properties with the default valence of the current atom type.boolean
isSearchNonDefaultValence()
Returns if the checker detects valence properties with a non-default valence of the current atom type.void
setSearchDefaultValence(boolean value)
Sets checker to detect valence properties with the default valence of the current atom type.void
setSearchNonDefaultValence(boolean value)
Sets checker to detect valence properties with non-default valence of the current atom type.-
Methods inherited from class chemaxon.checkers.AtomChecker
createResult, getComponent, getComponentCount
-
Methods inherited from class chemaxon.checkers.ComponentChecker
check1, initialize
-
Methods inherited from class chemaxon.checkers.AbstractStructureChecker
addPropertyChangeListener, addPropertyChangeListener, check, clone, cloneItem, convertResult, expandMolecule, getDescription, getDescriptor, getEditorClassName, getErrorCode, getErrorDescription, getErrorType, getHelpText, getIcon, getLocalMenuName, getName, isAvailable, isLicensed, isValid, propertyChange, removePropertyChangeListener, removePropertyChangeListener, setDescription, setHelpText, setIcon, setLicenseEnvironment, setLocalMenuName, setMoreErrorMessage, setName, setNoErrorMessage, setOneErrorMessage, toString
-
-
-
-
Field Detail
-
PROPERTY_KEY_DEFAULT_VALENCE
public static final String PROPERTY_KEY_DEFAULT_VALENCE
Search for valence properties that are equal to the default valence. These might be unnecessary.- See Also:
- Constant Field Values
-
PROPERTY_KEY_NON_DEFAULT_VALENCE
public static final String PROPERTY_KEY_NON_DEFAULT_VALENCE
Search for valence properties that are not equal to the default valence.- See Also:
- Constant Field Values
-
PROPERTY_KEY_SEARCH_DEFAULT_VALENCE
public static final String PROPERTY_KEY_SEARCH_DEFAULT_VALENCE
Search default valence property- See Also:
- Constant Field Values
-
PROPERTY_KEY_SEARCH_NON_DEFAULT_VALENCE
public static final String PROPERTY_KEY_SEARCH_NON_DEFAULT_VALENCE
Search non default valence property- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ValencePropertyChecker
public ValencePropertyChecker()
Creates a new ValencePropertyChecker instance.
-
ValencePropertyChecker
public ValencePropertyChecker(Map<String,String> params)
Creates a new ValencePropertyChecker instance. If "default" parameter is given, and its value is "true" then it detects atoms having a valence property that is equal to the default valence of the current atom type. If "non-default" parameter given, and its value is "true" then it detects atoms having a valence property that is not equal to the default valence of the current atom type.- Parameters:
params
- aMap
instance which contains String pairs. Key is the name of the parameter.
-
-
Method Detail
-
check
protected boolean check(Molecule molecule, MolAtom component)
Description copied from class:ComponentChecker
Checks if the component with index i has problem- Specified by:
check
in classComponentChecker<MolAtom>
- Parameters:
molecule
- is aMolecule
instancecomponent
- the current component to check- Returns:
- true if the component has problem, false otherwise
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractStructureChecker
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractStructureChecker
-
isSearchDefaultValence
public boolean isSearchDefaultValence()
Returns if the checker detects valence properties with the default valence of the current atom type.- Returns:
- true if the checker detects default valence properties
-
isSearchNonDefaultValence
public boolean isSearchNonDefaultValence()
Returns if the checker detects valence properties with a non-default valence of the current atom type.- Returns:
- true if the checker detects non-default valence properties
-
setSearchDefaultValence
public void setSearchDefaultValence(boolean value)
Sets checker to detect valence properties with the default valence of the current atom type.- Parameters:
value
- if true, the checker will detect atoms with default valence properties, otherwise not
-
setSearchNonDefaultValence
public void setSearchNonDefaultValence(boolean value)
Sets checker to detect valence properties with non-default valence of the current atom type.- Parameters:
value
- if true, the checker will detect atoms with non-default valence properties, otherwise not
-
-