Java Hashtable Create getGUIDS(Hashtable table)

Here you can find the source of getGUIDS(Hashtable table)

Description

get GUIDS

License

Open Source License

Declaration

static Enumeration getGUIDS(Hashtable table) 

Method Source Code

//package com.java2s;
/*//from  w w w .ja  va 2 s  .  c om
 * Copyright (c) Fiorano Software and affiliates. All rights reserved. http://www.fiorano.com
 * The software in this package is published under the terms of the CPAL v1.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE.txt file.
 */

import java.util.*;

public class Main {
    static Enumeration getGUIDS(Hashtable table) {
        TreeSet<String> set = new TreeSet<>();
        Enumeration eenum = table.keys();
        while (eenum.hasMoreElements()) {
            String str = (String) eenum.nextElement();
            set.add(str.substring(0, str.indexOf(";")));
        }
        return Collections.enumeration(set);
    }
}

Related

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