Modifier and Type | Field and Description |
---|---|
private static Nillable.Absent |
INSTANCE |
Modifier | Constructor and Description |
---|---|
private |
Absent() |
Modifier and Type | Method and Description |
---|---|
(package private) <T> Nillable<T> |
cast() |
boolean |
equals(Object obj) |
Object |
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 |
hasReason()
Checks if this
Nillable is nil and has a reason. |
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 Object,X> fun)
Transforms this
Nillable to the target type. |
private static final Nillable.Absent INSTANCE
public boolean hasReason()
Nillable
Nillable
is nil and has a reason.public com.google.common.base.Optional<String> getNilReason()
Nillable
getNilReason
in class Nillable<Object>
Nillable.isNil()
public Object get()
Nillable
get
in class Nillable<Object>
Nillable.isPresent()
public boolean isNil()
Nillable
Nillable
is nil
.isNil
in class Nillable<Object>
nil
Nillable.isPresent()
,
Nillable.isAbsent()
public boolean isAbsent()
Nillable
Nillable
is null
.isAbsent
in class Nillable<Object>
null
Nillable.isNil()
,
Nillable.isPresent()
public boolean isPresent()
Nillable
Nillable
is present.isPresent
in class Nillable<Object>
Nillable.isNil()
,
Nillable.isAbsent()
public <X> Nillable<X> transform(com.google.common.base.Function<? super Object,X> fun)
Nillable
Nillable
to the target type.<T> Nillable<T> cast()
Copyright © 2012-2015 52north.org. All Rights Reserved.