Side of Software
Persistence Library 2.0

sos.db
Class LongMap<V>

java.lang.Object
  extended by sos.db.LongMap<V>

public final class LongMap<V>
extends java.lang.Object

A utility class that maps long keys to Object values.

Since:
2.0

Nested Class Summary
static class LongMap.Entry<V>
          A utility class used by LongMap that captures a mapping between a long key and an Object value.
 
Method Summary
 java.util.Iterator<LongMap.Entry<V>> entryIterator()
          Returns a read-only iterator that iterates through this map's entries.
 V get(long key)
          Returns the object mapped to key, or null if no such mapping exists.
 boolean isEmpty()
          Returns true if this map contains no mappings.
 int size()
          Returns the number of key-value mappings in this map.
 java.util.Iterator<V> valueIterator()
          Returns a read-only iterator of the values in this map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

entryIterator

public java.util.Iterator<LongMap.Entry<V>> entryIterator()
Returns a read-only iterator that iterates through this map's entries. Each value returned by the iterator is an instance of LongMap.Entry.

Returns:
a means to iterate through the mappings
See Also:
LongMap.Entry

get

public V get(long key)
Returns the object mapped to key, or null if no such mapping exists.

Parameters:
key - the key for which to find the associated object
Returns:
the object mapped to key, or null if none

isEmpty

public boolean isEmpty()
Returns true if this map contains no mappings.

Returns:
true if this map contains no mappings; false, otherwise

size

public int size()
Returns the number of key-value mappings in this map.

Returns:
the size of this map

valueIterator

public java.util.Iterator<V> valueIterator()
Returns a read-only iterator of the values in this map.

Returns:
a means to iterate through this map's values

Side of Software
Persistence Library 2.0

Copyright 2004-08 Side of Software (SOS). All rights reserved.