Class ValencePropertyChecker

All Implemented Interfaces:
StructureChecker, chemaxon.license.Licensable, PropertyChangeListener, Cloneable, EventListener

@PublicApi public class ValencePropertyChecker extends AtomChecker
A descendant of AtomChecker detecting atoms having an explicitly set valence property.
Since:
Marvin 5.6
  • Field Details

    • 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:
    • 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:
    • PROPERTY_KEY_SEARCH_DEFAULT_VALENCE

      public static final String PROPERTY_KEY_SEARCH_DEFAULT_VALENCE
      Search default valence property
      See Also:
    • PROPERTY_KEY_SEARCH_NON_DEFAULT_VALENCE

      public static final String PROPERTY_KEY_SEARCH_NON_DEFAULT_VALENCE
      Search non default valence property
      See Also:
  • Constructor Details

    • 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 - a Map instance which contains String pairs. Key is the name of the parameter.
  • Method Details

    • 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 class ComponentChecker<MolAtom>
      Parameters:
      molecule - is a Molecule instance
      component - the current component to check
      Returns:
      true if the component has problem, false otherwise
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AbstractStructureChecker
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractStructureChecker
    • 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