## org.apache.mahout.cf.taste.impl.common
Class FastByIDMap<V>

    java.lang.Object
      org.apache.mahout.cf.taste.impl.common.FastByIDMap<V>

All Implemented Interfaces:
  Serializable, Cloneable

    public final class FastByIDMap<V>

extends Object
implements Serializable, Cloneable

See Also:
  `FastMap`, `FastIDSet`, Serialized Form

Field Summary
`static int` `NO_MAX_SIZE`

Constructor Summary
`FastByIDMap()` Creates a new `FastByIDMap` with default capacity.
`FastByIDMap(int size)`
`FastByIDMap(int size, float loadFactor)`
`FastByIDMap(int size, int maxSize)`
`FastByIDMap(int size, int maxSize, float loadFactor)` Creates a new `FastByIDMap` whose capacity can accommodate the given number of entries without rehash.

Method Summary
`void` `clear()`
`FastByIDMap<V>` `clone()`
`boolean` `containsKey(long key)`
`boolean` `containsValue(Object value)`
`Set<Map.Entry<Long,V>>` `entrySet()`
`boolean` `equals(Object other)`
`V` `get(long key)`
`int` `hashCode()`
`boolean` `isEmpty()`
`LongPrimitiveIterator` `keySetIterator()`
`V` `put(long key, V value)`
`void` `rehash()`
`V` `remove(long key)`
`int` `size()`
`String` `toString()`
`Collection<V>` `values()`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### NO_MAX_SIZE

    public static final int NO_MAX_SIZE

See Also:
  Constant Field Values

Constructor Detail

### FastByIDMap

    public FastByIDMap()

  Creates a new `FastByIDMap` with default capacity.

### FastByIDMap

    public FastByIDMap(int size)

### FastByIDMap

    public FastByIDMap(int size,
                       float loadFactor)

### FastByIDMap

    public FastByIDMap(int size,
                       int maxSize)

### FastByIDMap

    public FastByIDMap(int size,
                       int maxSize,
                       float loadFactor)

  Creates a new `FastByIDMap` whose capacity can accommodate the given number of entries without rehash.

  Parameters:
    `size` - desired capacity
    `maxSize` - max capacity
    `loadFactor` - ratio of internal hash table size to current size
  Throws:
    `IllegalArgumentException` - if size is less than 0, maxSize is less than 1 or at least half of `RandomUtils.MAX_INT_SMALLER_TWIN_PRIME`, or loadFactor is less than 1

Method Detail

### get

    public V get(long key)

### size

    public int size()

### isEmpty

    public boolean isEmpty()

### containsKey

    public boolean containsKey(long key)

### containsValue

    public boolean containsValue(Object value)

### put

    public V put(long key,
                 V value)

### remove

    public V remove(long key)

### clear

    public void clear()

### keySetIterator

    public LongPrimitiveIterator keySetIterator()

### entrySet

    public Set<Map.Entry<Long,V>> entrySet()

### values

    public Collection<V> values()

### rehash

    public void rehash()

### clone

    public FastByIDMap<V> clone()

  Overrides:
    `clone` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object other)

  Overrides:
    `equals` in class `Object`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.