*/
public static <T> T mode(T... items) {
if (ArrayUtils.isNotEmpty(items)) {
HashMap<T, MutableInt> occurrences = new HashMap<T, MutableInt>(items.length);
for (T t : items) {
MutableInt count = occurrences.get(t);
if (count == null) {
occurrences.put(t, new MutableInt(1));
} else {
count.increment();
}
}
T result = null;
int max = 0;
for (Map.Entry<T, MutableInt> e : occurrences.entrySet()) {