java.lang.Object
io.helidon.builder.api.GeneratedBuilder.EqualityUtil
- Enclosing class:
GeneratedBuilder
Utility methods for equals and hash code of specific cases of field types.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanoptionalCharArrayEquals(Optional<char[]> first, Optional<char[]> second) Equals that usesArrays.equals(char[], char[])in case both optionals have a value.static intoptionalCharArrayHash(Optional<char[]> instance) Hash code that usesArrays.hashCode(char[])in case the optional has a value.
-
Method Details
-
optionalCharArrayEquals
Equals that usesArrays.equals(char[], char[])in case both optionals have a value.- Parameters:
first- first optionalsecond- second optional- Returns:
- whether the optionals are equals
-
optionalCharArrayHash
Hash code that usesArrays.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
-