Modifier and Type | Field and Description |
---|---|
private static Nillable.Nil |
INAPPLICABLE |
private static Nillable.Nil |
MISSING |
private com.google.common.base.Optional<String> |
reason |
private static Nillable.Nil |
TEMPLATE |
private static Nillable.Nil |
UNKNOWN |
private static Nillable.Nil |
WITHHELD |
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 |
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.Nil INAPPLICABLE
private static final Nillable.Nil MISSING
private static final Nillable.Nil TEMPLATE
private static final Nillable.Nil UNKNOWN
private static final Nillable.Nil WITHHELD
private final com.google.common.base.Optional<String> reason
Nil(String reason)
public com.google.common.base.Optional<String> getNilReason()
Nillable
getNilReason
in class Nillable<Object>
Nillable.isNil()
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 Object get()
Nillable
get
in class Nillable<Object>
Nillable.isPresent()
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.