Parsing Engine

danbikel.util
Interface FlexibleMap<K,V>

All Superinterfaces:
Map<K,V>
All Known Implementing Classes:
BiCountsTable, CountsTableImpl, HashMap, HashMapDouble, HashMapInt, HashMapPrimitive, HashMapTwoDoubles, HashMapTwoInts, ProbabilityCache

public interface FlexibleMap<K,V>
extends Map<K,V>

Specifies useful/necessary diagnostic and lookup methods that the Map and HashMap APIs lack.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Method Summary
 V get(K key, int hashCode)
          Returns the value for the specified key.
 int getCapacity()
          Gets the capacity of this map (optional operation).
 float getLoadFactor()
          Gets the load factor of this map (optional operation).
 String getStats()
          Returns a string that represents the useful statistics of this map (useful/necessary in the case of hash maps, where it is desirable to know the number of collisions and average and maximum buckets sizes).
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

getCapacity

int getCapacity()
Gets the capacity of this map (optional operation).

Returns:
the capacity of this map (the number of buckets, in the case of a hash map)
Throws:
UnsupportedOperationException - if this map is not a hash map

getLoadFactor

float getLoadFactor()
Gets the load factor of this map (optional operation).

Returns:
the load factor of this map
Throws:
UnsupportedOperationException - if this map is not a hash map

getStats

String getStats()
Returns a string that represents the useful statistics of this map (useful/necessary in the case of hash maps, where it is desirable to know the number of collisions and average and maximum buckets sizes). The format of the string is up to the implementor.


get

V get(K key,
      int hashCode)
Returns the value for the specified key. If the specified hash code is not the value of key.hashCode(), the behavior of thiscollins method is not defined.

Parameters:
key - the key whose value is to be looked up
hashCode - the value of key.hashCode()

Parsing Engine

Author: Dan Bikel.