Class AbstractTestCondition

    • Field Detail

      • m_Tested

        protected boolean m_Tested
        whether the condition has been tested.
      • m_TestResult

        protected String m_TestResult
        the test result, null=test passed, otherwise error message.
    • Constructor Detail

      • AbstractTestCondition

        public AbstractTestCondition()
    • Method Detail

      • reset

        public void reset()
        Resets the condition. Derived classes must call this method in set-methods of parameters to assure the invalidation of previously generated data.
        Overrides:
        reset in class AbstractOptionHandler
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the object, which can be displayed in the GUI.

        Default implementation returns null.
        Specified by:
        getQuickInfo in interface QuickInfoSupporter
        Specified by:
        getQuickInfo in interface TestCondition
        Returns:
        null if no info available, otherwise short string
      • performTest

        protected abstract String performTest()
        Performs the actual testing of the condition.
        Returns:
        the test result, null if everything OK, otherwise the error message
      • getTestResult

        public String getTestResult()
        Returns the test result of testing the conditions. Performs the test, if necessary.
        Specified by:
        getTestResult in interface TestCondition
        Returns:
        the test result, null if everything OK, otherwise the error message
      • compareTo

        public int compareTo​(Object o)
        Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

        Only compares the commandlines of the two objects.
        Specified by:
        compareTo in interface Comparable
        Parameters:
        o - the object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Throws:
        ClassCastException - if the specified object's type prevents it from being compared to this object.
      • equals

        public boolean equals​(Object o)
        Returns whether the two objects are the same.

        Only compares the commandlines of the two objects.
        Overrides:
        equals in class Object
        Parameters:
        o - the object to be compared
        Returns:
        true if the object is the same as this one
      • getConditions

        public static String[] getConditions()
        Returns a list with classnames of filters.
        Returns:
        the filter classnames
      • forName

        public static TestCondition forName​(String classname,
                                            String[] options)
        Instantiates the filter with the given options.
        Parameters:
        classname - the classname of the filter to instantiate
        options - the options for the filter
        Returns:
        the instantiated filter or null if an error occurred
      • forCommandLine

        public static TestCondition forCommandLine​(String cmdline)
        Instantiates the filter from the given commandline (i.e., classname and optional options).
        Parameters:
        cmdline - the classname (and optional options) of the filter to instantiate
        Returns:
        the instantiated filter or null if an error occurred