public class

IntMap

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.collect.IntMap

Class Overview

A memory-efficient map (dictionary) of int primitives to int primitives. Additions, retrieval, updates are supported. Deletes are not supported.

All ints are valid keys and values. The value 0, however, may indicate an empty entry.

Note: hashCode() and equals(Object) are not overridden.

Summary

Public Constructors
IntMap()
Public Methods
void clear()
boolean containsKey(int key)
Determine if the key maps to an entry in the map.
int get(int key)
Retrieve a value associated to a key.
boolean isEmpty()
int put(int key, int val)
Add an entry.
int size()
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public IntMap ()

Public Methods

public void clear ()

public boolean containsKey (int key)

Determine if the key maps to an entry in the map.

public int get (int key)

Retrieve a value associated to a key.

Returns
  • the value; 0 may indicate that the entry was not present in the map

public boolean isEmpty ()

public int put (int key, int val)

Add an entry.

Returns
  • the previous value (0 if there was none associated with the key)

public int size ()

public String toString ()