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 MethodHandleDescReturns aMethodHandleDescdescribing the constructor orstaticmethod 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 newQualifierswith thisQualifiers' entries and additional entries represented by the suppliedqualifiers.final Qualifiers<V>Returns a usually newQualifierswith thisQualifiers' entries and an additional entry consisting of the suppliedQualifier.final Qualifiers<V>withPrefix(String prefix) Returns a usually newQualifierswhoseQualifiers' attribute keys are prefixed with the suppliedprefix.final Qualifiers<V>withPrefix(Function<? super Qualifier<V>, ? extends String> f) Returns a usually newQualifierswhoseQualifiers' 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 newQualifierswith thisQualifiers' entries and an additional entry consisting of the suppliedQualifier.The returned
Qualifierswill be new unlessqualifierisnull, in which casethiswill be returned.- Parameters:
qualifier- aQualifier; may benullin which casethiswill be returned- Returns:
- a
Qualifierswith 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 newQualifierswith thisQualifiers' entries and additional entries represented by the suppliedqualifiers.The returned
Qualifierswill be new unlessqualifierisnull, in which casethiswill be returned.- Parameters:
qualifiers- additionalQualifiers; may benullin which casethiswill be returned- Returns:
- a
Qualifierswith 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 newQualifierswhoseQualifiers' attribute keys are prefixed with the suppliedprefix.If this
Qualifiersis empty, thenthisis returned.- Parameters:
prefix- a prefix; ifnullthenthiswill be returned- Returns:
- a usually new
QualifierswhoseQualifiers' attribute keys are prefixed with the suppliedprefix - Idempotency:
- This method is idempotent and deterministic,
assuming the supplied
Functionis. - Nullability:
- This method never returns
null. - Thread Safety:
- This method is safe for concurrent use by multiple threads
-
withPrefix
Returns a usually newQualifierswhoseQualifiers' attribute keys are produced by the suppliedFunction, which is expected to prepend a prefix to the original key and return the result.If this
Qualifiersis empty, thenthisis returned.- Parameters:
f- a deterministic, idempotentFunctionthat accepts keys drawn from thisQualifiers'Qualifiers' attribute keys and returns a non-nullprefixed version of that key; may benullin which casethiswill be returned- Returns:
- a usually new
QualifierswhoseQualifiers' attribute keys have been prefixed by the actions of the suppliedFunction - Idempotency:
- This method is idempotent and deterministic,
assuming the supplied
Functionis. - Nullability:
- This method never returns
null. - Thread Safety:
- This method is safe for concurrent use by multiple
threads, assuming the supplied
Functionis
-
describeConstructor
Returns aMethodHandleDescdescribing the constructor orstaticmethod that will be used to create a dynamic constant representing thisQualifiers.- Overrides:
describeConstructorin classBindings<V,Qualifier<V>> - Returns:
- a
MethodHandleDescdescribing the constructor orstaticmethod 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 soleQualifiertheQualifierswill contain; must not benull- Returns:
- a
Qualifiers - Throws:
NullPointerException- ifqualifierisnull- 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 firstQualifiertheQualifierswill contain; must not benullqualifier1- the secondQualifiertheQualifierswill contain; must not benull- Returns:
- a
Qualifiers - Throws:
NullPointerException- ifqualifierisnull- 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- anIterablerepresentingQualifierinstances theQualifierswill 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 firstQualifiertheQualifierswill contain; must not benullqualifier1- the secondQualifiertheQualifierswill contain; must not benull- Returns:
- a
Qualifiers - Throws:
NullPointerException- ifqualifierisnull- 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- anIterablerepresentingQualifierinstances theQualifierswill 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.
-