jp.livewell.baby.pool
クラス PoolReference

java.lang.Object
  |
  +--jp.livewell.baby.pool.PoolReference

public class PoolReference
extends java.lang.Object

ガベージコレクションを妨げないPoolへの参照です。

作成者:
mitsuhito

コンストラクタの概要
PoolReference(Pool pool)
          Poolのinstanceを指定してPoolReferenceを構築します。
 
メソッドの概要
 Pool get()
          このPoolRefereceが保持しているPoolのinstanceを返します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

PoolReference

public PoolReference(Pool pool)
              throws java.lang.NullPointerException
Poolのinstanceを指定してPoolReferenceを構築します。
パラメータ:
pool - Poolのinstance
例外:
java.lang.NullPointerException - poolがnullの場合
メソッドの詳細

get

public Pool get()
このPoolRefereceが保持しているPoolのinstanceを返します。既にPoolへの 弱参照からPoolが取得できない場合はNullPoolへの参照を返します。
戻り値:
このPoolRefereceが保持しているPoolのinstance。既に取得でき ない場合はNullPoolのinstance