Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.cache.pojo.util
Class Null

    java.lang.Object
      org.jboss.cache.pojo.util.Null

All Implemented Interfaces:
  Serializable

    public final class Null

extends Object
implements Serializable

Represent null values (based on org.jboss.util.Null)

Author:
  Scott Marlow
See Also:
  Serialized Form

Method Summary
`boolean` | `equals(Object obj)` Check if the given object is a Null instance or `null`.
`int` | `hashCode()` Hashcode of unknown (null) value will be zero.
`static Object` | `toNullKeyObject(Object aObject)` Represents null key as a special string value.
`static Object` | `toNullKeyValue(Object aObject)` Converts Null string representation back to null value.
`static Object` | `toNullObject(Object aObject)` Represents null as a special Null object marker.
`static Object` | `toNullValue(Object aObject)` If the passed object represents null (instance of Null.NULL_OBJECT_MARKER), will replace with null value.
`String` | `toString()` Return a string representation of null value.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Method Detail

### toNullObject

    public static final Object toNullObject(Object aObject)

  Represents null as a special Null object marker.

  Parameters:
    `aObject` -
  Returns:
    if aObject is null, return Null.NULL_OBJECT_MARKER otherwise return aObject.

### toNullKeyObject

    public static final Object toNullKeyObject(Object aObject)

  Represents null key as a special string value.

  Parameters:
    `aObject` -
  Returns:
    if aObject is null, return Null.NULL_AS_STRING_REPRESENTATION otherwise return aObject.

### toNullValue

    public static final Object toNullValue(Object aObject)

  If the passed object represents null (instance of Null.NULL_OBJECT_MARKER), will replace with null value.

  Parameters:
    `aObject` -
  Returns:
    null if aObject is instance of Null.NULL_OBJECT_MARKER, otherwise return aObject.

### toNullKeyValue

    public static final Object toNullKeyValue(Object aObject)

  Converts Null string representation back to null value.

  Parameters:
    `aObject` -
  Returns:
    null if aObject represents a null, otherwise return aObject.

### toString

    public String toString()

  Return a string representation of null value.

  Overrides:
    `toString` in class `Object`
  Returns:
    Null.NULL_AS_STRING_REPRESENTATION;

### hashCode

    public int hashCode()

  Hashcode of unknown (null) value will be zero.

  Overrides:
    `hashCode` in class `Object`
  Returns:
    Zero.

### equals

    public boolean equals(Object obj)

  Check if the given object is a Null instance or `null`.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `obj` - Object to test.
  Returns:
    True if the given object is a Null instance or `null`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007 JBoss, a division of Red Hat. All Rights Reserved.