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
A descendant of
AtomChecker
detecting atoms having an
explicitly set valence property.- Since:
- Marvin 5.6
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Search for valence properties that are equal to the default valence.static final String
Search for valence properties that are not equal to the default valence.static final String
Search default valence propertystatic final String
Search non default valence propertyFields inherited from class chemaxon.checkers.AbstractStructureChecker
errorType, propertyChangeSupport
Fields inherited from interface chemaxon.checkers.StructureChecker
PROPERTY_KEY_VALID
-
Constructor Summary
ConstructorDescriptionCreates a new ValencePropertyChecker instance.ValencePropertyChecker
(Map<String, String> params) Creates a new ValencePropertyChecker instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Checks if the component with index i has problemboolean
int
hashCode()
boolean
Returns if the checker detects valence properties with the default valence of the current atom type.boolean
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 Details
-
PROPERTY_KEY_DEFAULT_VALENCE
Search for valence properties that are equal to the default valence. These might be unnecessary.- See Also:
-
PROPERTY_KEY_NON_DEFAULT_VALENCE
Search for valence properties that are not equal to the default valence.- See Also:
-
PROPERTY_KEY_SEARCH_DEFAULT_VALENCE
Search default valence property- See Also:
-
PROPERTY_KEY_SEARCH_NON_DEFAULT_VALENCE
Search non default valence property- See Also:
-
-
Constructor Details
-
ValencePropertyChecker
public ValencePropertyChecker()Creates a new ValencePropertyChecker instance. -
ValencePropertyChecker
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 Details
-
check
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
- 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
-