Package com.complexible.common.base
Class Option<V>
java.lang.Object
com.complexible.common.base.Option<V>
Represents a configuration option. A configuration option is used as a key to get and set values from a
Options structure. In addition, an option has a predefined default value.- Since:
- 2.0
- Version:
- 2.0
- Author:
- Evren Sirin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Option<T> Creates an option with the given name andnulldefault value.static <T> Option<T> Creates an option with the given name and default value.booleanReturns the default value for this option.getName()inthashCode()voidsetDefaultValue(V defaultValue) Sets the default value for this option.toString()
-
Constructor Details
-
Option
-
-
Method Details
-
create
Creates an option with the given name andnulldefault value. -
create
Creates an option with the given name and default value. -
getDefaultValue
Returns the default value for this option. -
setDefaultValue
Sets the default value for this option. This will have a global effect. -
hashCode
public int hashCode() -
equals
-
toString
-
getName
-