From a4fb8eba6e57f3c8f6fe9d836a53fa031131df5a Mon Sep 17 00:00:00 2001 From: ray Date: Mon, 18 Aug 2003 21:53:59 +0000 Subject: [PATCH] The home of utility methods that don't quite fit anywhere else. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1203 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../java/com/samskivert/util/ObjectUtil.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 projects/samskivert/src/java/com/samskivert/util/ObjectUtil.java diff --git a/projects/samskivert/src/java/com/samskivert/util/ObjectUtil.java b/projects/samskivert/src/java/com/samskivert/util/ObjectUtil.java new file mode 100644 index 00000000..690a462a --- /dev/null +++ b/projects/samskivert/src/java/com/samskivert/util/ObjectUtil.java @@ -0,0 +1,18 @@ +// +// $Id: ObjectUtil.java,v 1.1 2003/08/18 21:53:59 ray Exp $ + +package com.samskivert.util; + +/** + * Utility methods that don't fit anywhere else. + */ +public class ObjectUtil +{ + /** + * Test two objects for equality safely. + */ + public static boolean equals (Object o1, Object o2) + { + return (o1 == null) ? (o2 == null) : o1.equals(o2); + } +}