java.lang.Object
org.microbean.qualifier.Bindings<V,Qualifier<V>>
org.microbean.qualifier.Qualifiers<V>
- Type Parameters:
V
- the type of aQualifier
's attribute values
- Author:
- Laird Nelson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionprotected final MethodHandleDesc
Returns aMethodHandleDesc
describing the constructor orstatic
method that will be used to create a dynamic constant representing thisQualifiers
.static final <V> Qualifiers<V>
of()
Returns aQualifiers
, which may or may not be newly created, whoseisEmpty()
method will returntrue
.static final <V> Qualifiers<V>
Returns aQualifiers
, which may or may not be newly created, representing the supplied arguments.static final <V> Qualifiers<V>
Returns aQualifiers
, which may or may not be newly created, representing the supplied arguments.static final <V> Qualifiers<V>
Returns aQualifiers
, which may or may not be newly created, representing the supplied arguments.static final Qualifiers<?>
ofDisparate
(Iterable<? extends Qualifier<?>> qualifiers) Returns aQualifiers
, which may or may not be newly created, representing the supplied arguments.static final Qualifiers<?>
ofDisparate
(Qualifier<?> qualifier0, Qualifier<?> qualifier1) Returns aQualifiers
, which may or may not be newly created, representing the supplied arguments.final Qualifiers<V>
Returns a usually newQualifiers
with thisQualifiers
' entries and additional entries represented by the suppliedqualifiers
.final Qualifiers<V>
Returns a usually newQualifiers
with thisQualifiers
' entries and an additional entry consisting of the suppliedQualifier
.final Qualifiers<V>
withPrefix
(String prefix) Returns a usually newQualifiers
whoseQualifier
s' attribute keys are prefixed with the suppliedprefix
.final Qualifiers<V>
withPrefix
(Function<? super Qualifier<V>, ? extends String> f) Returns a usually newQualifiers
whoseQualifier
s' attribute keys are produced by the suppliedFunction
, which is expected to prepend a prefix to the original key and return the result.Methods inherited from class org.microbean.qualifier.Bindings
contains, containsUnique, describeConstable, equals, hashCode, intersectionSize, isEmpty, iterator, size, spliterator, stream, symmetricDifferenceSize, toString, unique, uniqueValue
-
Method Details
-
plus
Returns a usually newQualifiers
with thisQualifiers
' entries and an additional entry consisting of the suppliedQualifier
.The returned
Qualifiers
will be new unlessqualifier
isnull
, in which casethis
will be returned.- Parameters:
qualifier
- aQualifier
; may benull
in which casethis
will be returned- Returns:
- a
Qualifiers
with thisQualifiers
' entries and an additional entry consisting of the suppliedQualifier
- See Also:
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
plus
Returns a usually newQualifiers
with thisQualifiers
' entries and additional entries represented by the suppliedqualifiers
.The returned
Qualifiers
will be new unlessqualifier
isnull
, in which casethis
will be returned.- Parameters:
qualifiers
- additionalQualifier
s; may benull
in which casethis
will be returned- Returns:
- a
Qualifiers
with thisQualifiers
' entries and additional entries represented by the suppliedqualifiers
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
withPrefix
Returns a usually newQualifiers
whoseQualifier
s' attribute keys are prefixed with the suppliedprefix
.If this
Qualifiers
is empty, thenthis
is returned.- Parameters:
prefix
- a prefix; ifnull
thenthis
will be returned- Returns:
- a usually new
Qualifiers
whoseQualifier
s' attribute keys are prefixed with the suppliedprefix
- Idempotency:
- This method is idempotent and deterministic,
assuming the supplied
Function
is. - Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads
-
withPrefix
Returns a usually newQualifiers
whoseQualifier
s' attribute keys are produced by the suppliedFunction
, which is expected to prepend a prefix to the original key and return the result.If this
Qualifiers
is empty, thenthis
is returned.- Parameters:
f
- a deterministic, idempotentFunction
that accepts keys drawn from thisQualifiers
'Qualifier
s' attribute keys and returns a non-null
prefixed version of that key; may benull
in which casethis
will be returned- Returns:
- a usually new
Qualifiers
whoseQualifier
s' attribute keys have been prefixed by the actions of the suppliedFunction
- Idempotency:
- This method is idempotent and deterministic,
assuming the supplied
Function
is. - Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple
threads, assuming the supplied
Function
is
-
describeConstructor
Returns aMethodHandleDesc
describing the constructor orstatic
method that will be used to create a dynamic constant representing thisQualifiers
.- Overrides:
describeConstructor
in classBindings<V,
Qualifier<V>> - Returns:
- a
MethodHandleDesc
describing the constructor orstatic
method that will be used to create a dynamic constant representing thisQualifiers
- Idempotency:
- This method is, and its overrides must be, idempotent and deterministic.
- Nullability:
- This method does not, and its overrides must not,
return
null
. - Thread Safety:
- This method is, and its overrides must be, safe for concurrent use by multiple threads.
-
of
Returns aQualifiers
, which may or may not be newly created, whoseisEmpty()
method will returntrue
.- Type Parameters:
V
- the type of theQualifier
's attribute values- Returns:
- a
Qualifiers
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
of
Returns aQualifiers
, which may or may not be newly created, representing the supplied arguments.- Type Parameters:
V
- the type of theQualifier
's attribute values- Parameters:
qualifier
- the soleQualifier
theQualifiers
will contain; must not benull
- Returns:
- a
Qualifiers
- Throws:
NullPointerException
- ifqualifier
isnull
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
of
Returns aQualifiers
, which may or may not be newly created, representing the supplied arguments.- Type Parameters:
V
- the type of theQualifier
's attribute values- Parameters:
qualifier0
- the firstQualifier
theQualifiers
will contain; must not benull
qualifier1
- the secondQualifier
theQualifiers
will contain; must not benull
- Returns:
- a
Qualifiers
- Throws:
NullPointerException
- ifqualifier
isnull
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
of
Returns aQualifiers
, which may or may not be newly created, representing the supplied arguments.- Type Parameters:
V
- the type of theQualifier
's attribute values- Parameters:
qualifiers
- anIterable
representingQualifier
instances theQualifiers
will contain; may benull
- Returns:
- a
Qualifiers
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
ofDisparate
Returns aQualifiers
, which may or may not be newly created, representing the supplied arguments.- Parameters:
qualifier0
- the firstQualifier
theQualifiers
will contain; must not benull
qualifier1
- the secondQualifier
theQualifiers
will contain; must not benull
- Returns:
- a
Qualifiers
- Throws:
NullPointerException
- ifqualifier
isnull
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
ofDisparate
Returns aQualifiers
, which may or may not be newly created, representing the supplied arguments.- Parameters:
qualifiers
- anIterable
representingQualifier
instances theQualifiers
will contain; may benull
- Returns:
- a
Qualifiers
- Idempotency:
- This method is idempotent and deterministic.
- Nullability:
- This method never returns
null
. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-