Sunday 20 April 2014

SortedSet

SortedSet extends Set interface.

SortedSet provides the methods like to get sub set of data, to get the portion of the set whose elements are greater than or equal to given element, to get the portion of the set whose elements are strictly less than given element etc.,

ConcurrentSkipListSet, TreeSet implements SortedSet interface.


public interface SortedSet<E> extends Set<E> {
 Comparator<? super E> comparator();
 SortedSet<E> subSet(E fromElement, E toElement);
 SortedSet<E> headSet(E toElement);
 SortedSet<E> tailSet(E fromElement);
 E first();
 E last();
}


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment