Annotation Interface SortComparator


@Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface SortComparator
Sort a Set or Map using the given Comparator.

Sorting is performed in memory, by Java's TreeSet or TreeMap, and is maintained by any operation that mutates the collection.

It is illegal to use both SortComparator and SortNatural.

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends Comparator<?>>
    A class which implements Comparator<E> where E is the element type.