Class Option<T>
java.lang.Object
com.mrivanplays.annotationconfig.core.resolver.options.Option<T>
- Type Parameters:
T
- type
Represents an option, which is holding a non-null value and information whether it can be
replaced or not.
- Since:
- 2.0.0
- Author:
- MrIvanPlays
-
Method Summary
Modifier and TypeMethodDescriptionMarks this option instance as replaceable.static <T> Option<T>
of
(T value) Creates a newOption
instance.boolean
Returns whether this option is replaceable in aCustomOptions
context.value()
Returns the value held by this option.
-
Method Details
-
of
Creates a newOption
instance.- Type Parameters:
T
- type- Parameters:
value
- a non-null value to be held by this option- Returns:
- option instance
-
replaceable
Returns whether this option is replaceable in aCustomOptions
context. By default, this will return afalse
boolean value.- Returns:
- replaceable or not
-
markReplaceable
Marks this option instance as replaceable.- Returns:
- this instance for chaining
-
value
Returns the value held by this option.- Returns:
- value
-