T - the kind of value stored in this NullPriorityValuepublic class NullPriorityValue<T> extends Object
PriorityValue this container also supports
null as value.| Constructor and Description |
|---|
NullPriorityValue() |
| Modifier and Type | Method and Description |
|---|---|
T |
get()
Gets the current value with the highest priority.
|
T |
get(Priority priority)
Gets the value for a given priority.
|
boolean |
isSet(Priority priority)
Tells whether the value for
priority is set. |
boolean |
isSomethingSet()
Tells whether at least one version is set.
|
boolean |
set(Priority priority,
T value)
Sets the value for a given priority.
|
boolean |
unset(Priority priority)
Removes the value for
priority. |
public boolean set(Priority priority, T value)
priority - the priority of valuevalue - the new value, can be nulltrue if the result of get()
changes because of the call of this methodpublic boolean isSomethingSet()
true if at least some value is setpublic boolean isSet(Priority priority)
priority is set.priority - the priority to inquiretrue if the value is setpublic boolean unset(Priority priority)
priority.priority - the priority to cleantrue if the result of get()
changes because of the call to this methodpublic T get(Priority priority)
priority - the priority for which the value is requestedset(Priority, Object) for prioritypublic T get()
nullCopyright © 2017 Docking Frames. All rights reserved.