public class ModificationValue<T> extends Object
Represents a value in the modification builder.
A value may be present or not, and if it is present then it may also be null.
Modifier and Type | Method and Description |
---|---|
static <T> ModificationValue<T> |
absent()
Creates a new instance for a value that is not present.
|
T |
get()
Returns the value.
|
boolean |
isPresent()
Checks whether the value is present.
|
static <T> ModificationValue<T> |
of(T value)
Creates a new instance with the given value.
|
public static <T> ModificationValue<T> of(T value)
Creates a new instance with the given value.
T
- the value typevalue
- the value (may be null)public static <T> ModificationValue<T> absent()
Creates a new instance for a value that is not present.
T
- the value typepublic boolean isPresent()
Checks whether the value is present.
true
if the value is presentpublic T get()
Returns the value.
Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.