org.apache.commons.lang
クラス ObjectUtils.Null

java.lang.Object
  拡張org.apache.commons.lang.ObjectUtils.Null
すべての実装インタフェース:
Serializable
含まれているクラス:
ObjectUtils

public static class ObjectUtils.Null
extends Object
implements Serializable

null が他の意味を持ってしまう場合の代用のために使用されます。

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

例えば、 HashMap の get(key) メソッドは指定されたキーに null が関連付けられていた場合にも該当するキーが存在しなかった場合にも null を返します。 Null は子の2つの場合を区別するために使用されます。

For example, in a HashMap the get(key) 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.

他の例としては HashTablenull を保持することができません。

Another example is HashTable, where null cannot be stored.

関連項目:
直列化された形式

コンストラクタの概要
private ObjectUtils.Null()
          制限されたコンストラクタ(シングルトン)
Restricted constructor - singleton
 
メソッドの概要
private  Object readResolve()
          シングルトンを保証します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ObjectUtils.Null

private ObjectUtils.Null()
制限されたコンストラクタ(シングルトン)
Restricted constructor - singleton

メソッドの詳細

readResolve

private Object readResolve()
シングルトンを保証します。
Ensure singleton.

戻り値:
シングルトンの値
the singleton value


このドキュメントは、Ja-Jakartaにより訳されました。 コメントがある場合は report@jajakarta.orgまでお願いします。
Translated into Japanese by jajakarta.org. The original page is here.
Copyright (c) 2002-2003 - Apache Software Foundation