Class Overview
An OptionalReference is a WeakReference with some added behaviour inspired by the Optional class.
Summary
[Expand]
Inherited Methods |
From class
java.lang.ref.Reference
void
|
clear()
|
boolean
|
enqueue()
|
T
|
get()
|
boolean
|
isEnqueued()
|
static
void
|
reachabilityFence(Object arg0)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
public
OptionalReference
(T r)
Public Methods
public
void
clearIfSame
(T object)
public
void
ifPresent
(Consumer<? super T> consumer)
public
boolean
is
(T object)
public
boolean
isPresent
()
public
T
orElse
(T other)