com.tensegrity.generic.util
Class IndexMap

java.lang.Object
  extended bycom.tensegrity.generic.util.IndexMap

public final class IndexMap
extends java.lang.Object

This class builds a HashMap of indices of an array from a given array. The map can be subsequently used for quick lookups of the position of one of the items in the array.

Version:
$Id: IndexMap.java,v 1.7 2005/05/23 11:50:08 KevinCVS Exp $
Author:
Stepan Rutz

Method Summary
static java.util.Map buildMap(java.lang.Object[] array)
          Returns a HashMap of indices of an array from a given array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

buildMap

public static final java.util.Map buildMap(java.lang.Object[] array)
Returns a HashMap of indices of an array from a given array. The map can then be used for quick lookups of the position of one of the objects previously stored in the array.

Parameters:
array - the source array
Returns:
a HashMap with Integer objects as values, which represent the objects index in the array.

Find more information in the class documentation



Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.