public abstract class AbstractOptions extends Object implements Options
Option containers| Modifier | Constructor and Description |
|---|---|
protected |
AbstractOptions()
Constructor for AbstractOptions.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Option<?> option)
Checks if the provided
Option key exists in this container |
<X> X |
get(Option<X> option)
Retrieve
Option value from this container |
<X> X |
get(Option<X> option,
X defaultValue)
Retrieve option value from this container.
|
<X> X |
get(String key,
Class<? extends Options> context) |
<X> X |
getOrDefault(Option<X> option)
Retrieve the option value.
|
boolean |
isLocked(Option<?> option)
Check locked status of option
|
@NotNull Iterator<Map.Entry<Option<?>,Object>> |
iterator() |
<X> void |
put(Option<X> option,
X value)
Add option value to this container
|
<X> void |
put(Option<X> option,
X value,
boolean locked)
Add option value to this container with the additional option to lockout the value
|
<X> X |
putIfAbsent(Option<X> option,
X value)
Add option value to this container if not yet existing
|
<X> void |
remove(Option<X> option)
Remove
Option value from this container. |
int |
size()
Returns the number of configuration
Option present for this container |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitget, getOrDefault, getOrDefault, isEmptyforEach, spliteratorpublic <X> void put(Option<X> option, X value)
Add option value to this container
public <X> X putIfAbsent(Option<X> option, X value)
OptionsAdd option value to this container if not yet existing
putIfAbsent in interface OptionsX - The captured type of the Optionoption - The Option keyvalue - The Option valuepublic <X> void put(Option<X> option, X value, boolean locked)
Add option value to this container with the additional option to lockout the value
put in interface OptionsX - The captured type of the Optionoption - The Option key to be used as lookupvalue - The value to be addedlocked - Set to true if we should lockout this value. Future invocations of Options.put(Option, Object) will result in failure for this configuration Optionpublic boolean isLocked(Option<?> option)
Check locked status of option
public boolean contains(Option<?> option)
Checks if the provided Option key exists in this container
public <X> X get(Option<X> option, X defaultValue)
Retrieve option value from this container. If missing, the provided default value will be returned
public <X> X getOrDefault(Option<X> option)
Retrieve the option value. If missing, the default value defined by the Option will be returned instead
getOrDefault in interface OptionsX - The captured type of the Optionoption - a Option objectOptionpublic int size()
Returns the number of configuration Option present for this container
Copyright © 2016–2024. All rights reserved.