1 package net.sf.openrocket.util;
6 * Null-safe equals method.
8 * @param first the first object to compare
9 * @param second the second object to compare
10 * @return whether the two objects are both equal or both <code>null</code>
12 public static boolean equals(Object first, Object second) {
14 return second == null;
16 return first.equals(second);
22 * Check whether an array contains a specified object.
24 * @param array the array to search
25 * @param search the object to search for
26 * @return whether the object was in the array
28 public static boolean contains(Object[] array, Object search) {
29 for (Object o : array) {
30 if (equals(o, search)) {