Annotation Type CollectionMapping


@Target({METHOD,PARAMETER})
@Retention(RUNTIME)
public @interface CollectionMapping
Specifies the comparator that should be used for sorting. This annotation is only valid on SortedSet, NavigableSet, NavigableMap and SortedMap. The default sort order is the natural order. By using this annotation, the sort order will be overridden.
Since:
1.0.0
Author:
Christian Beikov
  • Optional Element Summary

    Optional Elements 
    Modifier and Type Optional Element Description
    Class<? extends Comparator> comparator
    The comparator that should be used for sorting of the collection.
    boolean forceUnique
    Specifies whether the elements should be forcefully deduplicated if the collection allows duplicates or not.
    boolean ignoreIndex
    Specifies whether the index of the indexed collection should be ignored or not.
    boolean ordered
    Specifies whether entries in the collection should be ordered.
  • Element Details

    • comparator

      Class<? extends Comparator> comparator
      The comparator that should be used for sorting of the collection.
      Returns:
      the comparator used for sorting
      Default:
      java.util.Comparator.class
    • ordered

      boolean ordered
      Specifies whether entries in the collection should be ordered.
      Returns:
      true if ordered, false otherwise
      Default:
      false
    • ignoreIndex

      boolean ignoreIndex
      Specifies whether the index of the indexed collection should be ignored or not.
      Returns:
      true if the index should be ignored, false otherwise
      Default:
      false
    • forceUnique

      boolean forceUnique
      Specifies whether the elements should be forcefully deduplicated if the collection allows duplicates or not.
      Returns:
      true if the elements should be forcefully depduplicated, false otherwise
      Default:
      false