propertylist/IPropertylist: removed obsolete loadTextDB_sub()
[metux-java.git] / util / UniqueValues.java
blobfe7cde32b60ebb1e1db2723518bc1e8deed0f599
2 package org.de.metux.util;
4 import java.util.Hashtable;
5 import java.util.Enumeration;
7 public class UniqueValues
9 public static String[] unique(String par[])
11 Hashtable ht = new Hashtable();
13 if (par==null)
14 return null;
16 for (int x=0; x<par.length; x++)
17 ht.put(par[x],par[x]);
19 String out[] = new String[ht.size()];
20 int a = 0;
21 for (Enumeration e=ht.keys(); e.hasMoreElements(); )
22 out[a++] = (String)e.nextElement();
24 return out;