Java Hashtable Create getArray(Hashtable hash)

Here you can find the source of getArray(Hashtable hash)

Description

This method was created in VisualAge.

License

Open Source License

Parameter

Parameter Description
hash Hashtable

Declaration

public static Object[] getArray(Hashtable hash) 

Method Source Code


//package com.java2s;
import java.util.*;

public class Main {
    /**/*from  w w w  . ja  v  a  2s.co  m*/
     * This method was created in VisualAge.
     * @param hash Hashtable
     * @return 
     */
    public static Object[] getArray(Hashtable hash) {

        int len = hash.size();
        Object[] objs = new Object[len];

        Enumeration e = hash.elements();
        for (int i = 1; e.hasMoreElements(); i++)
            objs[len - i] = e.nextElement();

        return objs;
    }
}

Related

  1. createHashtable(int size)
  2. getGUIDS(Hashtable table)
  3. getKeyByEntry(Hashtable t, Object value)
  4. newHashtable(int initialCapacity)
  5. newHashTable(int initialCapacity, float loadFactor)