- All Superinterfaces:
NlsArgumentsKeys
A simple container for
This interface provides many static
argument
s used as dynamic arguments
of a NlsMessage
. It is similar to Map
but with less
overhead in case there are only up to two arguments.This interface provides many static
of*
methods to create instances of NlsArguments
.- See Also:
-
Field Summary
Fields inherited from interface io.github.mmm.nls.argument.NlsArgumentsKeys
KEY_ANNOTATION, KEY_ARGUMENT, KEY_CAPACITY, KEY_CONTAINER, KEY_DATE, KEY_DEFAULT, KEY_DIRECTORY, KEY_ERROR, KEY_EXISTING, KEY_EXPECTED, KEY_FILE, KEY_FORMAT, KEY_FUNCTION, KEY_ID, KEY_KEY, KEY_LOCATION, KEY_MAX, KEY_MIN, KEY_MODE, KEY_NAME, KEY_OBJECT, KEY_OPERATION, KEY_OPTION, KEY_PATH, KEY_PROPERTY, KEY_QUERY, KEY_RESOURCE, KEY_SIZE, KEY_SOURCE, KEY_TARGET_TYPE, KEY_TITLE, KEY_TYPE, KEY_URI, KEY_USER, KEY_VALUE
-
Method Summary
Modifier and TypeMethodDescriptiongetKey
(int index) default boolean
isEmpty()
static NlsArguments
of()
static NlsArguments
static NlsArguments
static NlsArguments
static NlsArguments
static NlsArguments
ofArgument
(Object value) static NlsArguments
static NlsArguments
static NlsArguments
static NlsArguments
static NlsArguments
static NlsArguments
ofKeyValue
(Object key, Object value) static NlsArguments
static NlsArguments
static NlsArguments
static NlsArguments
ofObjectKey
(Object object, Object key) static NlsArguments
static NlsArguments
static NlsArguments
ofValueMinMax
(Object value, Object min, Object max) int
size()
-
Method Details
-
get
- Parameters:
key
- the key of the argument to get. Please prefer one of theKEY_*
constants such asNlsArgumentsKeys.KEY_VALUE
.- Returns:
- the value of the argument with the given
key
ornull
if no such argument exists. - See Also:
-
getKey
-
size
int size()- Returns:
- the number of arguments.
-
isEmpty
default boolean isEmpty()- Returns:
true
if empty (size
is0
).
-
with
- Parameters:
key
- the key of the argument.value
- thevalue
of the argument.- Returns:
- the new
NlsArguments
extended with the given argument.
-
of
- Returns:
- an empty instance of
NlsArguments
.
-
of
- Parameters:
map
- theMap
with the arguments to wrap.- Returns:
- an instance of
NlsArguments
that delegates to the givenMap
.
-
of
- Parameters:
key
- the key of the argument.value
- thevalue
of the argument.- Returns:
- an instance of
NlsArguments
containing the single specified argument.
-
of
- Parameters:
key1
- the key of the first argument.value1
- thevalue
of the first argument.key2
- the key of the second argument.value2
- thevalue
of the second argument.- Returns:
- an instance of
NlsArguments
containing the single specified arguments.
-
of
static NlsArguments of(String key1, Object value1, String key2, Object value2, String key3, Object value3) - Parameters:
key1
- the key of the first argument.value1
- thevalue
of the first argument.key2
- the key of the second argument.value2
- thevalue
of the second argument.key3
- the key of the third argument.value3
- thevalue
of the third argument.- Returns:
- an instance of
NlsArguments
containing the single specified arguments.
-
ofValue
- Parameters:
value
- thevalue
forNlsArgumentsKeys.KEY_VALUE
.- Returns:
- an instance of
NlsArguments
containing the single specified argument.
-
ofObject
- Parameters:
value
- thevalue
forNlsArgumentsKeys.KEY_OBJECT
.- Returns:
- an instance of
NlsArguments
containing the single specified argument.
-
ofArgument
- Parameters:
value
- thevalue
forNlsArgumentsKeys.KEY_ARGUMENT
.- Returns:
- an instance of
NlsArguments
containing the single specified argument.
-
ofDefault
- Parameters:
value
- thevalue
forNlsArgumentsKeys.KEY_DEFAULT
.- Returns:
- an instance of
NlsArguments
containing the single specified argument.
-
ofDate
- Parameters:
value
- thevalue
forNlsArgumentsKeys.KEY_DATE
.- Returns:
- an instance of
NlsArguments
containing the single specified argument.
-
ofFile
- Parameters:
value
- thevalue
forNlsArgumentsKeys.KEY_FILE
.- Returns:
- an instance of
NlsArguments
containing the single specified argument.
-
ofName
- Parameters:
value
- thevalue
forNlsArgumentsKeys.KEY_NAME
.- Returns:
- an instance of
NlsArguments
containing the single specified argument.
-
ofType
- Parameters:
value
- thevalue
forNlsArgumentsKeys.KEY_TYPE
.- Returns:
- an instance of
NlsArguments
containing the single specified argument.
-
ofFormat
- Parameters:
value
- thevalue
forNlsArgumentsKeys.KEY_FORMAT
.- Returns:
- an instance of
NlsArguments
containing the single specified argument.
-
ofKey
- Parameters:
value
- thevalue
forNlsArgumentsKeys.KEY_KEY
.- Returns:
- an instance of
NlsArguments
containing the single specified argument.
-
ofKeyValue
- Parameters:
key
- thevalue
forNlsArgumentsKeys.KEY_KEY
.value
- thevalue
forNlsArgumentsKeys.KEY_VALUE
.- Returns:
- an instance of
NlsArguments
containing the single specified arguments.
-
ofObjectKey
- Parameters:
object
- thevalue
forNlsArgumentsKeys.KEY_OBJECT
.key
- thevalue
forNlsArgumentsKeys.KEY_KEY
.- Returns:
- an instance of
NlsArguments
containing the single specified arguments.
-
ofMinMax
- Parameters:
min
- thevalue
forNlsArgumentsKeys.KEY_MIN
.max
- thevalue
forNlsArgumentsKeys.KEY_MAX
.- Returns:
- an instance of
NlsArguments
containing the single specified arguments.
-
ofValueMinMax
- Parameters:
value
- thevalue
forNlsArgumentsKeys.KEY_VALUE
.min
- thevalue
forNlsArgumentsKeys.KEY_MIN
.max
- thevalue
forNlsArgumentsKeys.KEY_MAX
.- Returns:
- an instance of
NlsArguments
containing the single specified arguments.
-