Annotation Interface SingletonCollection


@Retention(RUNTIME) @Target(FIELD) public @interface SingletonCollection
This rule enables you to restrict a collection property to contain only zero or one elements. Type = exclusive-property Attributes: message: override the default error message
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Field Details

  • Element Details

    • message

      String message
      Default:
      "The collection property can not contain more than 1 item, found: %s"