17 java.util Part 1: The Collections Framework
17 java.util Part 1: The Collections Framework
T
his chapter begins our examination ofjava.util. This important package contains a large
assortment of classes and interfaces that support a broad range of functionality. For
example,java.utilhas classes that generate pseudorandom numbers, manage date and
time, observe events, manipulate sets of bits, tokenize strings, and handle formatted data.
Thejava.utilpackage also contains one of Java’s most powerful subsystems: TheCollections
Framework.The Collections Framework is a sophisticated hierarchy of interfaces and classes
that provide state-of-the-art technology for managing groups of objects. It merits close attention
by all programmers.
Becausejava.utilcontains a wide array of functionality, it is quite large. Here is a list of
its classes:
AbstractCollection EventObject Random
AbstractList FormattableFlags ResourceBundle
AbstractMap Formatter Scanner
AbstractQueue GregorianCalendar ServiceLoader (Added by Java SE 6.)
AbstractSequentialList HashMap SimpleTimeZone
AbstractSet HashSet Stack
ArrayDeque (Added by Java SE 6.) Hashtable StringTokenizer
ArrayList IdentityHashMap Timer
Arrays LinkedHashMap TimerTask
BitSet LinkedHashSet TimeZone
Calendar LinkedList TreeMap
Collections ListResourceBundle TreeSet
Currency Locale UUID
Date Obser vable Vector
Dictionar y PriorityQueue WeakHashMap
EnumMap Proper ties
EnumSet Proper tyPermission
EventListenerProxy Proper tyResourceBundle
437