Class ComponentChecker<E>

    • Method Detail

      • getComponentCount

        protected abstract int getComponentCount​(Molecule molecule)
        Gets the number of the components in the molecule
        molecule - the molecule to check
        the number of the components in the molecule
      • getComponent

        protected abstract E getComponent​(Molecule molecule,
                                          int i)
        Gets the component from the molecule with index i.
        molecule - the molecule to check
        i - the index of the component
        the component
      • initialize

        protected void initialize()
        Empty default implementation
      • check1

        protected StructureCheckerResult check1​(Molecule molecule)
        Iterates through the components and checks every component. If a component has error it is added to a List. After the iteration if no problem occurred the result is null otherwise the method creates a StructureCheckerResult containing the atoms and bonds of the problematic components.
        Specified by:
        check1 in class AbstractStructureChecker
        molecule - the Molecule instance to be checked for problems
        a StructureCheckerResult which contains all the indices of the problematic components
      • check

        protected abstract boolean check​(Molecule molecule,
                                         E component)
        Checks if the component with index i has problem
        molecule - is a Molecule instance
        component - the current component to check
        true if the component has problem, false otherwise