]> git.gag.com Git - debian/openrocket/blob - src/net/sf/openrocket/util/Utils.java
language selector, bug fixed
[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 }