JML

org.jmlspecs.models
Class JMLNullSafe

java.lang.Object
  extended byorg.jmlspecs.models.JMLNullSafe

public class JMLNullSafe
extends Object

A class with static methods that safely work with null objects.

Version:
$Revision: 1.8 $
Author:
Katie Becker and Gary T. Leavens

Constructor Summary
private JMLNullSafe()
          No instances of this class can be created.
 
Method Summary
static boolean equals(Object o1, Object o2)
          Test for equality of o1 and o2, allowing either to be null.
static int hashCode(Object o)
          Return a hash code for the argument, which may be null.
static String toString(Object o)
          Return a string representation for the argument, which may be null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMLNullSafe

private JMLNullSafe()
No instances of this class can be created.

Method Detail

equals

public static boolean equals(Object o1,
                             Object o2)
Test for equality of o1 and o2, allowing either to be null.


toString

public static String toString(Object o)
Return a string representation for the argument, which may be null.


hashCode

public static int hashCode(Object o)
Return a hash code for the argument, which may be null.


JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.