Java Collections Archive

Map interface in Collection

The Map interface is not an extension of Collection interface. Instead the interface starts of it’s own interface hierarchy, for maintaining key-value associations. The interface describes a mapping from keys to values, without duplicate keys, …

TreeSet Class in Collection

public class TreeSet<E> extends AbstractSet<E> implements NavigableSet<E>, Cloneable, Serializable A NavigableSet implementation based on a TreeMap. The elements are ordered using their natural ordering, or by a Comparator provided at set creation time, depending on …