Skip to content

API Overview

Dawid Weiss edited this page May 6, 2015 · 3 revisions

While HPPC is not strictly modeled after Java Collections Framework (JCF), we did try to make the APIs look similar enough for comfortable use. The following data structures are present in the library:

  • array-backed lists,
  • array-backed stacks,
  • array-backed deques,
  • hash sets (and scatter sets),
  • hash maps (and scatter maps).

The JavaDocs of each release contain a nice overview of these, but in general all HPPC classes come in two flavors: one for (almost) every primitive type and one for Objects (with a generic type).

Technically, the classes for primitives are automatically generated from the same template as the one for generics. For example, the list template KTypeArrayList generates the following (and other) classes:

Not every combination makes sense and these are omitted (a list of booleans is technically identically a byte list; probably better represented by a bitset).

There is a diagram of classes and interfaces included in the JavaDocs of each release. See the class diagram for the current structure on the master branch.

There are two flavors of associative containers: scatter and hash (sets and maps), the difference is explained here (and is important).