Class ObjectUtils.Null

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    ObjectUtils

    public static class ObjectUtils.Null
    extends java.lang.Object
    implements java.io.Serializable

    Class used as a null placeholder where null has another meaning.

    For example, in a HashMap the HashMap.get(java.lang.Object) method returns null if the Map contains null or if there is no matching key. The Null placeholder can be used to distinguish between these two cases.

    Another example is Hashtable, where null cannot be stored.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID
      Required for serialization support.
    • Constructor Summary

      Constructors 
      Constructor Description
      Null()
      Restricted constructor - singleton.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.Object readResolve()
      Ensure singleton.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Required for serialization support. Declare serialization compatibility with Commons Lang 1.0
        See Also:
        Serializable, Constant Field Values
    • Constructor Detail

      • Null

        Null()
        Restricted constructor - singleton.
    • Method Detail

      • readResolve

        private java.lang.Object readResolve()

        Ensure singleton.

        Returns:
        the singleton value