- Type Parameters:
T - the referent type
V - the handler type
Abstraction over reference implementations that keep a cleanup handler alongside the referent.
-
Method Summary
void
Clears the current referent.
Returns the current referent.
Returns the handler that should be notified when the reference is processed.
-
Method Details
-
get
Returns the current referent.
- Returns:
- the referent, or
null if it is no longer available
-
clear
void clear()
Clears the current referent.
-
getHandler
Returns the handler that should be notified when the reference is processed.
- Returns:
- the associated handler