Quadcap Embeddable Database

com.quadcap.util.collections.LongMap Class Reference

List of all members.

Detailed Description

A map with long values as keys.

Author:
Stan Bailes

Definition at line 50 of file LongMap.java.

Public Member Functions

 LongMap (int initSize)
 Create an empty map with a specified number of buckets.

synchronized final Object get (long key)
 Return the Object with the specified key value.

synchronized final void put (long key, Object val)
 Insert a key, value pair.

synchronized final void remove (long key)
 Remove the specified key.

String toString ()
final int size ()
 Return the number of entries.

final int buckets ()
LongIterator keys ()

Package Functions

final Entry getEntry (long key, Object val)
final void freeEntry (Entry entry)
final boolean isPrime (int x)
final int hash (long key)

Package Attributes

int size = 0
Entry[] entries
Entry freeList


Constructor & Destructor Documentation

com.quadcap.util.collections.LongMap.LongMap int  initSize  ) 
 

Create an empty map with a specified number of buckets.

Definition at line 58 of file LongMap.java.

References com.quadcap.util.collections.LongMap.entries, and com.quadcap.util.collections.LongMap.isPrime().


Member Function Documentation

final int com.quadcap.util.collections.LongMap.buckets  ) 
 

Definition at line 138 of file LongMap.java.

References com.quadcap.util.collections.LongMap.entries.

final void com.quadcap.util.collections.LongMap.freeEntry Entry  entry  )  [package]
 

Definition at line 154 of file LongMap.java.

References com.quadcap.util.collections.LongMap.freeEntry(), com.quadcap.util.collections.LongMap.freeList, com.quadcap.util.collections.LongMap.Entry.next, and com.quadcap.util.collections.LongMap.Entry.val.

Referenced by com.quadcap.util.collections.LongMap.freeEntry(), and com.quadcap.util.collections.LongMap.remove().

synchronized final Object com.quadcap.util.collections.LongMap.get long  key  ) 
 

Return the Object with the specified key value.

Definition at line 67 of file LongMap.java.

References com.quadcap.util.collections.LongMap.entries, com.quadcap.util.collections.LongMap.get(), com.quadcap.util.collections.LongMap.hash(), com.quadcap.util.collections.LongMap.Entry.key, com.quadcap.util.collections.LongMap.Entry.next, and com.quadcap.util.collections.LongMap.Entry.val.

Referenced by com.quadcap.util.collections.LongMap.get().

final Entry com.quadcap.util.collections.LongMap.getEntry long  key,
Object  val
[package]
 

Definition at line 141 of file LongMap.java.

References com.quadcap.util.collections.LongMap.freeList, com.quadcap.util.collections.LongMap.getEntry(), com.quadcap.util.collections.LongMap.Entry.key, com.quadcap.util.collections.LongMap.Entry.next, and com.quadcap.util.collections.LongMap.Entry.val.

Referenced by com.quadcap.util.collections.LongMap.getEntry(), and com.quadcap.util.collections.LongMap.put().

final int com.quadcap.util.collections.LongMap.hash long  key  )  [package]
 

Definition at line 169 of file LongMap.java.

References com.quadcap.util.collections.LongMap.entries, and com.quadcap.util.collections.LongMap.hash().

Referenced by com.quadcap.util.collections.LongMap.get(), com.quadcap.util.collections.LongMap.hash(), com.quadcap.util.collections.LongMap.put(), and com.quadcap.util.collections.LongMap.remove().

final boolean com.quadcap.util.collections.LongMap.isPrime int  x  )  [package]
 

Definition at line 161 of file LongMap.java.

References com.quadcap.util.collections.LongMap.isPrime().

Referenced by com.quadcap.util.collections.LongMap.isPrime(), and com.quadcap.util.collections.LongMap.LongMap().

LongIterator com.quadcap.util.collections.LongMap.keys  ) 
 

Definition at line 165 of file LongMap.java.

Referenced by com.quadcap.util.collections.LongMap.toString().

synchronized final void com.quadcap.util.collections.LongMap.put long  key,
Object  val
 

Insert a key, value pair.

Definition at line 78 of file LongMap.java.

References com.quadcap.util.collections.LongMap.entries, com.quadcap.util.collections.LongMap.getEntry(), com.quadcap.util.collections.LongMap.hash(), com.quadcap.util.collections.LongMap.Entry.key, com.quadcap.util.collections.LongMap.Entry.next, com.quadcap.util.collections.LongMap.put(), and com.quadcap.util.collections.LongMap.Entry.val.

Referenced by com.quadcap.sql.file.Logger1.getActiveTransactions(), and com.quadcap.util.collections.LongMap.put().

synchronized final void com.quadcap.util.collections.LongMap.remove long  key  ) 
 

Remove the specified key.

Definition at line 94 of file LongMap.java.

References com.quadcap.util.collections.LongMap.entries, com.quadcap.util.collections.LongMap.freeEntry(), com.quadcap.util.collections.LongMap.hash(), com.quadcap.util.collections.LongMap.Entry.key, com.quadcap.util.collections.LongMap.Entry.next, and com.quadcap.util.collections.LongMap.remove().

Referenced by com.quadcap.util.collections.LongMap.LongMapIterator.remove(), and com.quadcap.util.collections.LongMap.remove().

final int com.quadcap.util.collections.LongMap.size  ) 
 

Return the number of entries.

Definition at line 136 of file LongMap.java.

String com.quadcap.util.collections.LongMap.toString  ) 
 

Definition at line 114 of file LongMap.java.

References com.quadcap.util.collections.LongMap.keys(), and com.quadcap.util.collections.LongIterator.nextLong().


Member Data Documentation

Entry [] com.quadcap.util.collections.LongMap.entries [package]
 

Definition at line 52 of file LongMap.java.

Referenced by com.quadcap.util.collections.LongMap.LongMapIterator.advance(), com.quadcap.util.collections.LongMap.buckets(), com.quadcap.util.collections.LongMap.get(), com.quadcap.util.collections.LongMap.hash(), com.quadcap.util.collections.LongMap.LongMap(), com.quadcap.util.collections.LongMap.put(), and com.quadcap.util.collections.LongMap.remove().

Entry com.quadcap.util.collections.LongMap.freeList [package]
 

Definition at line 53 of file LongMap.java.

Referenced by com.quadcap.util.collections.LongMap.freeEntry(), and com.quadcap.util.collections.LongMap.getEntry().

int com.quadcap.util.collections.LongMap.size = 0 [package]
 

Definition at line 51 of file LongMap.java.