Class diagram of Set API
- Details
- Written by Nam Ha Minh
- Last Updated on 13 June 2019   |   Print Email
This post helps you understand how the Set interfaces and classes are designed in the Java Collections framework.
You know, in Set API:
- Set<E>is the base interface for all kinds of set. This interface extends all methods from the Collection<E> interface and does not define any new methods.
- Sub interfaces: SortedSet<E> and NavigableSet<E>.
- Abstract subclasses: AbstractSet<E> and EnumSet<E extends enum<E>>.
- Concrete implementation classes: HashSet<E>,LinkedHashSet<E>,TreeSet<E>, ConcurrentSkipListSet<E> and CopyOnWriteArraySet<E> (these two last classes are under java.util.concurrent package).
- The JobStateReasons class extends HashSet<E> but it is not a member of Java Collections Framework.
The following class diagram outlines the Set API in Java Collections Framework:
Related Java Set Tutorials:
Other Java Collections Tutorials:
- What is Java Collections Framework?
- Java Queue Tutorial
- Java List Tutorial
- Java Map Tutorial
- Understand equals and hashCode
- Understand object ordering
Comments