Annotation Type Singular


@Target({FIELD,PARAMETER}) @Retention(SOURCE) public @interface Singular
The singular annotation is used together with @Builder to create single element 'add' methods in the builder for collections.
  • Element Details

    • value

      String value
      Returns:
      The singular name of this field. If it's a normal english plural, lombok will figure it out automatically. Otherwise, this parameter is mandatory.
      Default:
      ""
    • ignoreNullCollections

      boolean ignoreNullCollections
      Returns:
      If true, the plural variant (which takes a collection and adds each element inside) will treat null as an empty collection, i.e. do nothing. If false (the default), it is null checked as if annotated with @lombok.NonNull.
      Default:
      false