src/main/java/wycc/util/ArrayUtils.java
public static <T> T[] removeDuplicates(T[] items) {
		int count = 0;
		// First, identify duplicates and store this information in a bitset.
		BitSet duplicates = new BitSet(items.length);
		for (int i = 0; i != items.length; ++i) {
			T ith = items[i];
			for (int j = i + 1; j < items.length; ++j) {
				T jth = items[j];
				if(ith == null) {
					if(jth == null) {
						duplicates.set(i);
						count = count + 1;
						break;
					}
				} else if (ith.equals(jth)) {
					duplicates.set(i);
					count = count + 1;
					break;
				}
			}
		}
		// Second, eliminate duplicates (if any)
		if (count == 0) {
			// nothing actually needs to be removed
			return items;
		} else {
			T[] nItems = Arrays.copyOf(items, items.length - count);
			for (int i = 0, j = 0; i != items.length; ++i) {
				if (duplicates.get(i)) {
					// this is a duplicate, ignore
				} else {
					nItems[j++] = items[i];
				}
			}
			return nItems;
		}
	}
public static <T> T[] removeDuplicates(T[] items) {
		int count = 0;
		// First, identify duplicates and store this information in a bitset.
		BitSet duplicates = new BitSet(items.length);
		for (int i = 0; i != items.length; ++i) {
			T ith = items[i];
			for (int j = i + 1; j < items.length; ++j) {
				T jth = items[j];
				if(ith == null) {
					if(jth == null) {
						duplicates.set(i);
						count = count + 1;
						break;
					}
				} else if (ith.equals(jth)) {
					duplicates.set(i);
					count = count + 1;
					break;
				}
			}
		}
		// Second, eliminate duplicates (if any)
		if (count == 0) {
			// nothing actually needs to be removed
			return items;
		} else {
			T[] nItems = Arrays.copyOf(items, items.length - count);
			for (int i = 0, j = 0; i != items.length; ++i) {
				if (duplicates.get(i)) {
					// this is a duplicate, ignore
				} else {
					nItems[j++] = items[i];
				}
			}
			return nItems;
		}
	}
Remove duplicate types from an unsorted array. This produces a potentially
smaller array with all duplicates removed. Null is permitted in the array
and will be preserved, though duplicates of it will not be. Items in the
array are compared using <code>Object.equals()</code>.

@param items
The array for which duplicates are to be removed
@return