Description of Collection Interfaces


The Collection Interfaces
This enables you to work with groups of objects; it is at the top of the collections hierarchy.
Lists:- Lists of things (classes that implement List).
 
Sets:-Unique things (classes that implement Set).
 
Queues:- Things arranged by the order in which they are to be processed.
Maps Things with a unique ID (classes that implement Map).

SortedSet extends Set :-This interface extends interface Set. A set that further guarantees that its iterator will traverse the set in ascending element order, sorted according to the natural ordering of its elements  or by a Comparator provided at sorted set creation time.

NavigableSet extends SortedSet:-The java.util.NavigableSet interface is a subtype of the java.util.SortedSet interface. It behaves like a SortedSet with the exception you have navigation methods available in addition to the sorting mechanisms of the SortedSet.we will look closer at the methods of the NavigableSet  interface later...

SortedMap extends Map:- A SortedMap is a map that maintains its entries in ascending order, sorted according to the keys' natural order, or according to a Comparator provided at SortedMap creation time

NavigaleMap extends SortedMap:-NavigableMap is similar to NavigableSet. In NavigableMap we use methods to return the key value pair like navMap.put(1, "January"); whereas in NavigableSet we use methods to return values.

Related Post:- Collection Classes

People who read this post also read :



0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More