Class Qualifiers
java.lang.Object
org.microbean.assign.Qualifiers
A utility class for working with qualifiers.
This class is currently not used by other classes in this package. It may be useful in a variety of dependency injection systems.
- Author:
- Laird Nelson
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnormalize(List<Attributes> list) Returns the qualifier (meta-) qualifier.booleanReturnstrueif and only if the suppliedAttributesis anAttributesthat can be used to designate otherAttributesas qualifiers.Returns an immutableListconsisting solely of the qualifier (meta-) qualifier.qualifiers(Collection<? extends Attributes> c) Returns an unmodifiableListconsisting only of thoseAttributesin the suppliedCollectionthat are qualifiers.
-
Constructor Details
-
Qualifiers
public Qualifiers()Creates a newQualifiers.
-
-
Method Details
-
normalize
Returns anAttributesthat is equal to the suppliedAttributes.The returned
Attributesmay be the suppliedAttributesor a different instance.- Parameters:
a- anAttributes; must not benull- Returns:
- an
Attributesthat is equal to the suppliedAttributes; nevernull - Throws:
NullPointerException- ifaisnull
-
normalize
Returns an immutableListofAttributess that is equal to the suppliedList.The returned
Listmay be the suppliedListor a different instance.- Parameters:
list- aListofAttributess; must not benull- Returns:
- an immutable
ListofAttributess that is equal to the suppliedList; nevernull - Throws:
NullPointerException- iflistisnull
-
qualifier
Returns the qualifier (meta-) qualifier.- Returns:
- the qualifier (meta-) qualifier; never
null
-
qualifier
Returnstrueif and only if the suppliedAttributesis anAttributesthat can be used to designate otherAttributesas qualifiers.- Parameters:
q- anAttributes; must not benull- Returns:
trueif and only if the suppliedAttributesis anAttributesthat can be used to designate otherAttributesas qualifiers- Throws:
NullPointerException- ifqisnull
-
qualifiers
-
qualifiers
Returns an unmodifiableListconsisting only of thoseAttributesin the suppliedCollectionthat are qualifiers.- Parameters:
c- aCollectionofAttributess; must not benull- Returns:
- an unmodifiable
Listconsisting only of thoseAttributess in the suppliedCollectionthat are qualifiers; nevernull - Throws:
NullPointerException- ifcisnull
-