com.devexperts.util
Class AbstractLongMap<V>

java.lang.Object
  extended by java.util.AbstractMap<Long,V>
      extended by com.devexperts.util.AbstractLongMap<V>
All Implemented Interfaces:
LongMap<V>, Map<Long,V>
Direct Known Subclasses:
LongHashMap

public abstract class AbstractLongMap<V>
extends AbstractMap<Long,V>
implements LongMap<V>

This class provides a skeletal implementation of the LongMap interface, to minimize the effort required to implement this interface.

See Also:
AbstractMap

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface com.devexperts.util.LongMap
LongMap.Entry<V>
 
Constructor Summary
AbstractLongMap()
           
 
Method Summary
abstract  void clear()
           
abstract  boolean containsKey(long key)
          Returns true if this map contains a mapping for the specified key.
 boolean containsKey(Object key)
           
abstract  Set<Map.Entry<Long,V>> entrySet()
           
abstract  V get(long key)
          Returns the value to which this map maps the specified key.
 V get(Object key)
           
 Set<Long> keySet()
          Returns the same value as longKeySet() method does.
abstract  LongSet longKeySet()
          Returns a set view of the keys contained in this map.
abstract  V put(long key, V value)
          Associates the specified value with the specified key in this map.
 V put(Long key, V value)
           
abstract  V remove(long key)
          Removes the mapping for this key from this map if present.
 V remove(Object key)
           
abstract  int size()
           
abstract  Collection<V> values()
           
 
Methods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, isEmpty, putAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsValue, equals, hashCode, isEmpty, putAll
 

Constructor Detail

AbstractLongMap

public AbstractLongMap()
Method Detail

size

public abstract int size()
Specified by:
size in interface Map<Long,V>
Overrides:
size in class AbstractMap<Long,V>

clear

public abstract void clear()
Specified by:
clear in interface Map<Long,V>
Overrides:
clear in class AbstractMap<Long,V>

containsKey

public abstract boolean containsKey(long key)
Description copied from interface: LongMap
Returns true if this map contains a mapping for the specified key.

Specified by:
containsKey in interface LongMap<V>
See Also:
Map.containsKey(Object)

get

public abstract V get(long key)
Description copied from interface: LongMap
Returns the value to which this map maps the specified key. Returns null if the map contains no mapping for this key.

Specified by:
get in interface LongMap<V>
See Also:
Map.get(Object)

put

public abstract V put(long key,
                      V value)
Description copied from interface: LongMap
Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.

Specified by:
put in interface LongMap<V>
See Also:
Map.put(Object, Object)

remove

public abstract V remove(long key)
Description copied from interface: LongMap
Removes the mapping for this key from this map if present.

Specified by:
remove in interface LongMap<V>
See Also:
Map.remove(Object)

longKeySet

public abstract LongSet longKeySet()
Description copied from interface: LongMap
Returns a set view of the keys contained in this map.

Specified by:
longKeySet in interface LongMap<V>
See Also:
Map.keySet()

values

public abstract Collection<V> values()
Specified by:
values in interface Map<Long,V>
Overrides:
values in class AbstractMap<Long,V>

entrySet

public abstract Set<Map.Entry<Long,V>> entrySet()
Specified by:
entrySet in interface Map<Long,V>
Specified by:
entrySet in class AbstractMap<Long,V>

containsKey

public final boolean containsKey(Object key)
Specified by:
containsKey in interface Map<Long,V>
Overrides:
containsKey in class AbstractMap<Long,V>

get

public final V get(Object key)
Specified by:
get in interface Map<Long,V>
Overrides:
get in class AbstractMap<Long,V>

put

public final V put(Long key,
                   V value)
Specified by:
put in interface Map<Long,V>
Overrides:
put in class AbstractMap<Long,V>

remove

public final V remove(Object key)
Specified by:
remove in interface Map<Long,V>
Overrides:
remove in class AbstractMap<Long,V>

keySet

public final Set<Long> keySet()
Returns the same value as longKeySet() method does.

Specified by:
keySet in interface Map<Long,V>
Overrides:
keySet in class AbstractMap<Long,V>


Copyright © 2013 Devexperts. All Rights Reserved.