Package io.vavr.collection
Interface Ordered<T>
- Type Parameters:
T- the element type
- All Known Subinterfaces:
BitSet<T>,SortedMap<K,,V> SortedMultimap<K,,V> SortedSet<T>
- All Known Implementing Classes:
PriorityQueue,TreeMap,TreeMultimap,TreeSet
public interface Ordered<T>
A collection whose elements are arranged according to a well-defined order.
Implementations expose the
Comparator used to determine that order.- Author:
- Ruslan Sennov, Daniel Dietrich
-
Method Summary
Modifier and TypeMethodDescriptionReturns the comparator that governs the ordering of elements in this collection.
-
Method Details
-
comparator
Comparator<T> comparator()Returns the comparator that governs the ordering of elements in this collection. The returned comparator must be consistent with the collection's iteration order.- Returns:
- the comparator defining the element order
-