Friday, May 29, 2009

NavigableMap & NavigableSet interface

The NavigableMap interface extends the SortedMap interface in which the elements are ordered either by natural ordering or by using a Comparator. It contains methods to find out the closest matches for given search targets. All keys inserted into a sorted map must implement the Comparable interface and must be mutually comparable. The elements of the NavigableSet interface can be accessed and traversed in either ascending or descending order.

The NavigableSet interface extends the SortedSet interface in which the elements are ordered either by natural ordering or using a Comparator. It contains methods to find out the closest matches for given search targets. The elements of the NavigableSet interface must be mutually comparable. The elements of the NavigableSet interface can be accessed and traversed in either ascending or descending order.

1 comment:

  1. Kindly explain the usage in practical terms.
    ~Vinayak Gupta
    http://travellspace.blogspot.com/
    http://productnservicereviews.blogspot.com/
    http://bhukas.blogspot.com/
    http://openjavafaq.blogspot.com/

    ReplyDelete