Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
T |
get()
Returns the object if present.
|
com.google.common.base.Optional<String> |
getNilReason()
Returns the optional reason for this object being nil.
|
int |
hashCode() |
boolean |
isAbsent()
Checks if this
Nillable is null . |
boolean |
isNil()
Checks if this
Nillable is nil . |
boolean |
isPresent()
Checks if this
Nillable is present. |
String |
toString() |
<X> Nillable<X> |
transform(com.google.common.base.Function<? super T,X> fun)
Transforms this
Nillable to the target type. |
private final T obj
Present(T obj)
public com.google.common.base.Optional<String> getNilReason()
Nillable
getNilReason
in class Nillable<T>
Nillable.isNil()
public boolean isNil()
Nillable
Nillable
is nil
.isNil
in class Nillable<T>
nil
Nillable.isPresent()
,
Nillable.isAbsent()
public boolean isPresent()
Nillable
Nillable
is present.isPresent
in class Nillable<T>
Nillable.isNil()
,
Nillable.isAbsent()
public boolean isAbsent()
Nillable
Nillable
is null
.isAbsent
in class Nillable<T>
null
Nillable.isNil()
,
Nillable.isPresent()
public T get()
Nillable
get
in class Nillable<T>
Nillable.isPresent()
public <X> Nillable<X> transform(com.google.common.base.Function<? super T,X> fun)
Nillable
Nillable
to the target type.Copyright © 2012-2015 52north.org. All Rights Reserved.