Collection is unique, i.e. that we can't find 2 equal elements in
the collection.
For instance, this can be useful with JAX-RS, which always deserializes collections to a list. Thus, duplicates would implicitly and silently be removed when converting it to a set. This constraint allows you to check for duplicates in the list and to raise an error instead.
| Modifier and Type | Class and Description |
|---|---|
| public static @interface | UniqueElements.List
Defines several |
| Modifier and Type | Method and Description |
|---|---|
| public Class | |
| public String | |
| public Class |
| groups | back to summary |
|---|---|
| public Class | |
| message | back to summary |
|---|---|
| public String message() | |
| payload | back to summary |
|---|---|
| public Class | |
@UniqueElements annotations on the same element.
| Modifier and Type | Method and Description |
|---|---|
| public UniqueElements[] |
| value | back to summary |
|---|---|
| public UniqueElements[] value() | |