weiss.util
Interface SortedSet<AnyType>

All Superinterfaces:
Collection<AnyType>, java.lang.Iterable<AnyType>, java.io.Serializable, Set<AnyType>
All Known Implementing Classes:
TreeSet

public interface SortedSet<AnyType>
extends Set<AnyType>

SortedSet interface.


Method Summary
 Comparator<? super AnyType> comparator()
          Return the comparator used by this SortedSet.
 AnyType first()
          Find the smallest item in the set.
 AnyType last()
          Find the largest item in the set.
 
Methods inherited from interface weiss.util.Set
getMatch
 
Methods inherited from interface weiss.util.Collection
add, clear, contains, isEmpty, iterator, remove, size, toArray, toArray
 

Method Detail

comparator

Comparator<? super AnyType> comparator()
Return the comparator used by this SortedSet.

Returns:
the comparator or null if the default comparator is used.

first

AnyType first()
Find the smallest item in the set.

Returns:
the smallest item.
Throws:
NoSuchElementException - if the set is empty.

last

AnyType last()
Find the largest item in the set.

Returns:
the largest item.
Throws:
NoSuchElementException - if the set is empty.