Class FFM.GroupBinderBuilder<T, L extends GroupLayout, M extends GroupBinder<L,T> , SELF extends FFM.GroupBinderBuilder<T,L,M,SELF> >
- Direct Known Subclasses:
FFM.StructBinderBuilder, FFM.UnionBinderBuilder
- Enclosing class:
FFM
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Generates a class that implements theGroupBinderinterface for the group type using the current builder state, then returns a new instance of that class.withEquals(BiPredicate<T, Object> equals) Sets a customObject.equals(Object)implementation for the group.withHashCode(ToIntFunction<T> hashCode) Sets a customObject.hashCode()implementation for the group.withToString(Function<T, String> toString) Sets a customObject.toString()implementation for the group.Methods inherited from class FFM.GroupLayoutBuilder
alignas, automaticPadding, checkPadding, m, pack, padding, struct, struct, union, union
-
Method Details
-
build
Generates a class that implements theGroupBinderinterface for the group type using the current builder state, then returns a new instance of that class.- Returns:
- the
GroupBinderimplementation
-
withEquals
Sets a customObject.equals(Object)implementation for the group.By default, an
equalsmethod will be generated with the same semantics asRecord.equals(Object), where the canonical getters act as components. This means that the default implementation will not consider padding members or members with no corresponding getters.- Parameters:
equals- theequalsimplementation- Returns:
- this builder instance
- See Also:
-
withHashCode
Sets a customObject.hashCode()implementation for the group.By default, a
hashCodemethod will be generated with the same semantics asRecord.hashCode(), where the canonical getters act as components. This means that the default implementation will not consider padding members or members with no corresponding getters.- Parameters:
hashCode- thehashCodeimplementation- Returns:
- this builder instance
- See Also:
-
withToString
Sets a customObject.toString()implementation for the group.By default, a
toStringmethod will be generated with the same semantics asRecord.toString(), where the canonical getters act as components. This means that the default implementation will not consider padding members or members with no corresponding getters.- Parameters:
toString- thetoStringimplementation- Returns:
- this builder instance
- See Also:
-