V
- self typepublic abstract class ValueOption<V extends ValueOption<V>> extends Object implements WritableRawComparable, Restorable
Modifier and Type | Field and Description |
---|---|
protected boolean |
nullValue
Whether this value represents
null or not. |
Constructor and Description |
---|
ValueOption() |
Modifier and Type | Method and Description |
---|---|
abstract void |
copyFrom(V otherOrNull)
Deprecated.
Application developer should not use this method directly
|
boolean |
isNull()
Returns whether this object represents
null or not. |
boolean |
isPresent()
Returns whether this object has any value or not.
|
void |
max(V other)
Sets the specified value to this object only if the specified value is greater than this object.
|
void |
min(V other)
Sets the specified value to this object only if the specified value is less than this object.
|
V |
orOption(V other)
Returns the given value if this represents
null . |
ValueOption<V> |
setNull()
Deprecated.
Application developer should not use this method directly
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareInBytes, getSizeInBytes
compareTo
restore
public final boolean isNull()
null
or not.true
if this object represents null
, otherwise false
public final boolean isPresent()
true
if this object DOES NOT represent null
, otherwise false
@Deprecated public final ValueOption<V> setNull()
null
.public final V orOption(V other)
null
.other
- the target value which will be returned if this object represents null
null
, otherwise this@Deprecated public abstract void copyFrom(V otherOrNull)
otherOrNull
- the source object, or null
to make this value represent null
public final void min(V other)
null
, this object will also turn to null
.other
- the target valuepublic final void max(V other)
null
, this object will also turn to null
.other
- the target valueCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.