Class LangUtils


  • public final class LangUtils
    extends Object
    A set of utility methods to help produce consistent equals and hashCode methods.
    • Method Detail

      • hashCode

        public static int hashCode​(int seed,
                                   int hashcode)
      • hashCode

        public static int hashCode​(int seed,
                                   boolean b)
      • hashCode

        public static int hashCode​(int seed,
                                   Object obj)
      • equals

        public static boolean equals​(Object obj1,
                                     Object obj2)
        Check if two objects are equal.
        Parameters:
        obj1 - first object to compare, may be null
        obj2 - second object to compare, may be null
        Returns:
        true if the objects are equal or both null
      • equalsIgnoreCase

        public static boolean equalsIgnoreCase​(String s1,
                                               String s2)
        Check if two strings are equal, ignoring case considerations.
        Parameters:
        s1 - first string to compare, may be null
        s2 - second string to compare, may be null
        Returns:
        true if the objects are equal or both null