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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getKey()
Returns the parameter name.getValue()
Returns the parameter value.int
hashCode()
boolean
Determines whether the parameter is an undefined parameter.boolean
Determines whether the parameter is a wildcard parameter.static ConfigurationKey.Parameter
Creates a parameter with the specified key and value.toString()
static ConfigurationKey.Parameter
Creates an undefined parameter with the specified key.static ConfigurationKey.Parameter
Creates a wildcard parameter with the specified key.
-
Field Details
-
key
The parameter key. -
value
The paramteter 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
-
hashCode
public int hashCode() -
equals
-
toString
-