Module io.inverno.mod.configuration
Package io.inverno.mod.configuration
Class ConfigurationKey.Parameter
java.lang.Object
io.inverno.mod.configuration.ConfigurationKey.Parameter
- Direct Known Subclasses:
ConfigurationKey.UndefinedParameter,ConfigurationKey.WildcardParameter
- Enclosing interface:
ConfigurationKey
A parameter is used to specify the context in which a property value is defined.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleangetKey()Returns the parameter name.getValue()Returns the parameter value.inthashCode()booleanDetermines whether the parameter is an undefined parameter.booleanDetermines whether the parameter is a wildcard parameter.static ConfigurationKey.ParameterCreates a parameter with the specified key and value.toString()static ConfigurationKey.ParameterCreates an undefined parameter with the specified key.static ConfigurationKey.ParameterCreates a wildcard parameter with the specified key.
-
Field Details
-
key
The parameter key. -
value
The parameter value.
-
-
Method Details
-
getKey
Returns the parameter name.
- Returns:
- the name of the parameter
-
getValue
Returns the parameter value.
- Returns:
- the value of the parameter
-
isWildcard
public boolean isWildcard()Determines whether the parameter is a wildcard parameter.
- Returns:
- true if the parameter is a wildcard parameter, false otherwise
-
isUndefined
public boolean isUndefined()Determines whether the parameter is an undefined parameter.
- Returns:
- true if the parameter is an undefined parameter, false otherwise
-
of
public static ConfigurationKey.Parameter of(String key, Object value) throws IllegalArgumentException Creates a parameter with the specified key and value.
- Parameters:
key- the parameter keyvalue- the parameter value- Returns:
- a parameter
- Throws:
IllegalArgumentException- if the key is null or empty or if the value is null or not a string, nor a primitive
-
wildcard
Creates a wildcard parameter with the specified key.
- Parameters:
key- the parameter key- Returns:
- a wildcard parameter
- Throws:
IllegalArgumentException- if the key is null or empty
-
undefined
Creates an undefined parameter with the specified key.
- Parameters:
key- the parameter key- Returns:
- an undefined parameter
- Throws:
IllegalArgumentException- if the key is null or empty
-
equals
-
hashCode
public int hashCode() -
toString
-