Class AbstractObjectCompare<T,​R>

    • Constructor Detail

      • AbstractObjectCompare

        public AbstractObjectCompare()
    • Method Detail

      • 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
        Returns:
        null if no info available, otherwise short string
      • accepts

        public abstract Class[] accepts()
        Returns the classes that it can handle.
        Returns:
        the array of classes
      • generates

        public abstract Class generates()
        Returns the type of output that it generates.
        Returns:
        the class of the output
      • check

        protected void check​(T o1,
                             T o2)
        Checks the provided objects.
        Default implementation only ensures that objects are not null.
        Parameters:
        o1 - the first object
        o2 - the second object
      • doCompareObjects

        protected abstract R doCompareObjects​(T o1,
                                              T o2)
        Performs the actual comparison of the two objects.
        Parameters:
        o1 - the first object
        o2 - the second object
        Returns:
        the result of the comparison
      • compareObjects

        public R compareObjects​(T o1,
                                T o2)
        Compares the two objects.
        Parameters:
        o1 - the first object
        o2 - the second object
        Returns:
        the result of the comparison