Class Same


  • public class Same
    extends Object
    Utility to help isSame methods.
    • Constructor Detail

      • Same

        public Same()
    • Method Detail

      • sameByNull

        public static boolean sameByNull​(Object v1,
                                         Object v2)
        Return true if both values are null or both an not null.
      • sameByValue

        public static boolean sameByValue​(Collection<?> v1,
                                          Collection<?> v2)
        Return true if both collections are the same by value and order is taken into account.
      • sameBy

        public static boolean sameBy​(boolean byValue,
                                     Object value,
                                     Object value1)
        Null safe check by sameByValue or sameByNull based on byValue.