Class GeneratedBuilder.EqualityUtil

java.lang.Object
io.helidon.builder.api.GeneratedBuilder.EqualityUtil
Enclosing class:
GeneratedBuilder

public static class GeneratedBuilder.EqualityUtil extends Object
Utility methods for equals and hash code of specific cases of field types.
  • Constructor Details

    • EqualityUtil

      public EqualityUtil()
  • Method Details

    • optionalCharArrayEquals

      public static boolean optionalCharArrayEquals(Optional<char[]> first, Optional<char[]> second)
      Equals that uses Arrays.equals(char[], char[]) in case both optionals have a value.
      Parameters:
      first - first optional
      second - second optional
      Returns:
      whether the optionals are equals
    • optionalCharArrayHash

      public static int optionalCharArrayHash(Optional<char[]> instance)
      Hash code that uses Arrays.hashCode(char[]) in case the optional has a value.
      Parameters:
      instance - instance to get hash code for
      Returns:
      hash code that honors existence of char array