org.dishevelled.weighted
Class WeightedMaps

java.lang.Object
  extended by org.dishevelled.weighted.WeightedMaps

public final class WeightedMaps
extends Object

Static utility methods for WeightedMaps.

Version:
$Revision$ $Date$
Author:
Michael Heuer

Method Summary
static
<E> WeightedMap<E>
createWeightedMap()
          Create and return a new weighted map with the default initial capacity and load factor.
static
<E> WeightedMap<E>
createWeightedMap(int initialCapacity)
          Create and return new weighted map with the specified initial capacity and default load factor.
static
<E> WeightedMap<E>
createWeightedMap(int initialCapacity, float loadFactor)
          Create and return new weighted map with the specified initial capacity and load factor.
static
<E> WeightedMap<E>
createWeightedMap(WeightedMap<? extends E> weightedMap)
          Create and return a new weighted map with the elements and weights in the specified weighted map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createWeightedMap

public static <E> WeightedMap<E> createWeightedMap()
Create and return a new weighted map with the default initial capacity and load factor.

Type Parameters:
E - element type
Returns:
a new weighted map with the default initial capacity and load factor

createWeightedMap

public static <E> WeightedMap<E> createWeightedMap(int initialCapacity)
Create and return new weighted map with the specified initial capacity and default load factor.

Type Parameters:
E - element type
Parameters:
initialCapacity - initial capacity
Returns:
a new weighted map with the specified initial capacity and default load factor

createWeightedMap

public static <E> WeightedMap<E> createWeightedMap(int initialCapacity,
                                                   float loadFactor)
Create and return new weighted map with the specified initial capacity and load factor.

Type Parameters:
E - element type
Parameters:
initialCapacity - initial capacity
loadFactor - load factor
Returns:
a new weighted map with the specified initial capacity and load factor

createWeightedMap

public static <E> WeightedMap<E> createWeightedMap(WeightedMap<? extends E> weightedMap)
Create and return a new weighted map with the elements and weights in the specified weighted map.

Type Parameters:
E - element type
Parameters:
weightedMap - weighted map to copy, must not be null
Returns:
a new weighted map with the elements and weights in the specified weighted map


Copyright © 2005-2012 dishevelled.org. All Rights Reserved.