Class Qualifiers
java.lang.Object
org.microbean.assign.Qualifiers
A utility class for working with commonly-used qualifiers.
- Author:
- Laird Nelson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic final List<Attributes> Returns an unmodifiableListconsisting solely of the unattributed any qualifier and the default qualifier.static final AttributesReturns the unattributed any qualifier.static final booleanstatic final List<Attributes> Returns an immutableListconsisting solely of the unattributed any qualifier.static final AttributesReturns the default qualifier.static final booleanstatic final List<Attributes> Returns an immutableListconsisting solely of the default qualifier.static final List<Attributes> normalize(List<Attributes> list) static final Attributesstatic final AttributesReturns the primordial qualifier.static final booleanstatic final List<Attributes> Returns an immutableListconsisting solely of the primordial qualifier.static final AttributesReturns the qualifier (meta-) qualifier.static final booleanReturnstrueif and only if the suppliedAttributesis anAttributesthat can be used to designate otherAttributesas qualifiers.static final List<Attributes> Returns an immutableListconsisting solely of the qualifier (meta-) qualifier.static final List<Attributes> qualifiers(Collection<? extends Attributes> c) Returns an unmodifiableListconsisting only of thoseAttributesin the suppliedCollectionthat are qualifiers.
-
Method Details
-
anyAndDefaultQualifiers
-
anyQualifier
Returns the unattributed any qualifier.- Returns:
- the any qualifier; never
null - See Also:
-
anyQualifier
- Parameters:
a- anAttributes; must not benull- Returns:
trueif and only if the suppliedAttributesis equal to the unattributed any qualifier- Throws:
NullPointerException- ifaisnull
-
anyQualifiers
-
defaultQualifier
Returns the default qualifier.- Returns:
- the default qualifier; never
null - See Also:
-
defaultQualifier
- Parameters:
a- anAttributes; must not benull- Returns:
trueif and only if the suppliedAttributesis equal to the default qualifier- Throws:
NullPointerException- ifaisnull
-
defaultQualifiers
-
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
-
primordialQualifier
Returns the primordial qualifier.- Returns:
- the primordial qualifier; never
null - See Also:
-
primordialQualifier
- Parameters:
a- anAttributes; must not benull- Returns:
trueif and only if the suppliedAttributesis equal to the primordial qualifier- Throws:
NullPointerException- ifaisnull
-
primordialQualifiers
-
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
-