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.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
optionalCharArrayEquals
(Optional<char[]> first, Optional<char[]> second) Equals that usesArrays.equals(char[], char[])
in case both optionals have a value.static int
optionalCharArrayHash
(Optional<char[]> instance) Hash code that usesArrays.hashCode(char[])
in case the optional has a value.
-
Constructor Details
-
EqualityUtil
public EqualityUtil()
-
-
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
-