Name
Package java.util
Synopsis
The java.util
package, whose class hierarchy is
shown in Figure 13-1, contains several utility classes
that are of general use, but not central enough to the Java language to
be included in the java.lang
package.
The Java 2 version 1.3 java.util
package contains 54 classes
and interfaces. By contrast, the CLDC version contains only 10 classes;
MIDP adds another two for timer handling. As a result, these platforms have
drastically reduced support for collections and internationalization. The CDC
platform provides a much more complete implementation of this package, leaving
out only 7 classes, and the Foundation Profile requires that all of the J2SE
classes and interfaces be present. As with the other packages in this
reference section, we won’t address the CDC and Foundation Profile versions
here because the classes they contain are identical to those in J2SE.
See Java in a Nutshell (O’Reilly) for more
information.
The collection classes in this package are a subset of those available with
JDK 1.1. All vestiges of the Java 2 collections framework have been removed.
One consequence of this is that some classes have been reparented.
Vector
, for example, is derived from
Object
in CLDC rather than from
AbstractList
, as it is in J2SE. Other notable changes are
the removal of the Properties
class as well as the
Dictionary
class, the latter being the parent of
Hashtable
. In CLDC, Hashtable
remains, but it is derived from Object
instead.
CLDC retains the ...
Get J2ME in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.