gnu.trove.decorator.package.html Maven / Gradle / Ivy
GNU Trove API Documentation
GNU Trove: Decorators for java.util.{Map,Set} compatability
The classes in this package serve to wrap the Trove primitive
collections so that they can be used in operations that require a
java.util.Map or java.util.Set.
This is form of adaptation is extremely inefficient and
so should only be undertaken as a last resort or when you don't
care about performance (in which case Trove is probably not
appropriate anyway).
The general pattern here is that you "wrap" a Trove collection
with the appropriate decorator object to obtain a java.util.Map or
Set. The implementations do not retain references to the Objects
they accept/return (all calls are delegated to the underlying
trove collection), so you should not rely on object identity
within those collections.
You may extend the decorator classes to use canonical values if
your dataset permits. For some applications, this will help
reduce the cost of (un)wrapping primitive values. Note, however,
that such datasets are probably small/restricted enough that you
should again ask yourself whether Trove is appropriate in the
first place. Caveat programmer.
Last modified: Mon Sep 23 22:55:32 PDT 2002