Class BaseCommand<T>

  • Direct Known Subclasses:
    MergeCommand

    public abstract class BaseCommand<T>
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseCommand()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract boolean areEqual​(T objA, T objB)  
      <U> java.util.List<U> diffOf​(@Nullable java.util.List<U> updated, @Nullable java.util.List<U> original, java.util.Comparator<U> comparator)
      Abstract method give diff between two List passed based on comparator.
      @NonNull java.util.List<T> diffOf​(java.util.List<T> updated, java.util.List<T> original)
      Abstract method give diff between two List passed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BaseCommand

        public BaseCommand()
    • Method Detail

      • diffOf

        public <U> java.util.List<U> diffOf​(@Nullable java.util.List<U> updated,
                                            @Nullable java.util.List<U> original,
                                            java.util.Comparator<U> comparator)
        Abstract method give diff between two List passed based on comparator.
        Type Parameters:
        U - U extends DataObject
        Parameters:
        updated - Updated List
        original - Origina list to be compared with
        comparator - based on which diff will be returned
        Returns:
        List of diff based on comparator
      • diffOf

        public @NonNull java.util.List<T> diffOf​(java.util.List<T> updated,
                                                 java.util.List<T> original)
        Abstract method give diff between two List passed.
        Parameters:
        updated - Updated List
        original - Origina list to be compared with
        Returns:
        List of diff based
      • areEqual

        public abstract boolean areEqual​(T objA,
                                         T objB)