org.anarres.jperf
Class PerfectStringMapGenerator<V>

java.lang.Object
  extended by org.anarres.jperf.PerfectMapGenerator<String,V>
      extended by org.anarres.jperf.PerfectStringMapGenerator<V>

public class PerfectStringMapGenerator<V>
extends PerfectMapGenerator<String,V>


Constructor Summary
PerfectStringMapGenerator(byte[] keys)
           
 
Method Summary
 void add(String k, V v)
          Adds a key-value pair to the perfect map.
 Map<String,V> toMap()
          Returns an optimal map based on the given key-value pairs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerfectStringMapGenerator

public PerfectStringMapGenerator(byte[] keys)
Method Detail

add

public void add(String k,
                V v)
Description copied from class: PerfectMapGenerator
Adds a key-value pair to the perfect map.

Specified by:
add in class PerfectMapGenerator<String,V>

toMap

public Map<String,V> toMap()
Description copied from class: PerfectMapGenerator
Returns an optimal map based on the given key-value pairs. This method may take some time to execute. The time tradeoff happens here: to get faster runtime speed, time is sacrified here. The object returned from this method is not necessarily an instance or subclass of PerfectMap - it might, for example, be returned from Collections.emptyMap().

Specified by:
toMap in class PerfectMapGenerator<String,V>


Copyright © 2002-2008 Shevek, Anarres. All Rights Reserved.