IntRefHashMap

com.netflix.atlas.core.util.IntRefHashMap
class IntRefHashMap[T <: AnyRef](noData: Int, capacity: Int)

Mutable integer map based on open-addressing. Primary use-case is computing a count for the number of times a particular value was encountered.

Value parameters

capacity

Initial capacity guideline. The actual size of the underlying buffer will be the next prime >= capacity. Default is 10.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def foreach(f: (Int, T) => Unit): Unit

Execute f for each item in the set.

Execute f for each item in the set.

Attributes

def foreachKey(f: Int => Unit): Unit

Execute f for each key in the map.

Execute f for each key in the map.

Attributes

def get(k: Int): T

Get the value associated with key, k. If no value is present, then the dflt value will be returned.

Get the value associated with key, k. If no value is present, then the dflt value will be returned.

Attributes

def put(k: Int, v: T): Unit

Put an integer key/value pair into the map. The key, k, should not be equivalent to the noData value used for this map. If an entry with the same key already exists, then the value will be overwritten.

Put an integer key/value pair into the map. The key, k, should not be equivalent to the noData value used for this map. If an entry with the same key already exists, then the value will be overwritten.

Attributes

def size: Int

Return the number of items in the set. This is a constant time operation.

Return the number of items in the set. This is a constant time operation.

Attributes

def toMap: Map[Int, T]

Converts this set to a Map[Int, Int]. Used mostly for debugging and tests.

Converts this set to a Map[Int, Int]. Used mostly for debugging and tests.

Attributes