Annotation Interface Singular
The annotation to be used with
Builder
or SuperBuilder
on a property to create
a single element method for filling a collection. The final collection is immutable by default.
The name of the singular method is extracted from the property name converting plural name to a singular,
in a case it's not possible to recognize the singular name it's required to provide it in the value attribute.
The only supported collections are:
- Iterable
- Collection
- List
- Set
- SortedSet
- Map
- SortedMap
- Since:
- 1.2
- Author:
- Denis Stepanov
-
Optional Element Summary
-
Element Details
-
value
String value- Returns:
- The name of the singular method. If the collection doesn't end with "s" the name is required.
- Default:
- ""
-