com.googlecode.gwt.test.internal.utils.ArrayUtils Maven / Gradle / Ivy
package com.googlecode.gwt.test.internal.utils;
import java.util.HashMap;
import java.util.Map;
/**
* Some array utility methods. For internal use only.
*
* @author Gael Lazzari
*/
public class ArrayUtils {
public static boolean contains(Object[] array, Object valueToFind) {
for (int i = 0; i < array.length; i++) {
if (valueToFind.equals(array[i])) {
return true;
}
}
return false;
}
public static Map copyMap(Map map) {
Map result = new HashMap();
for (Map.Entry entry : map.entrySet()) {
result.put(entry.getKey(), entry.getValue());
}
return result;
}
private ArrayUtils() {
}
}