39b3e861f9ea221b58374646488ae9539e45c041
[debian/openrocket] / src / net / sf / openrocket / util / Utils.java
1 package net.sf.openrocket.util;
2
3 public class Utils {
4         
5         /**
6          * Null-safe equals method.
7          * 
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>
11          */
12         public static boolean equals(Object first, Object second) {
13                 if (first == null) {
14                         return second == null;
15                 } else {
16                         return first.equals(second);
17                 }
18         }
19         
20 }