Class Qualifier<V>

java.lang.Object
org.microbean.qualifier.Binding<V,Qualifier<V>>
org.microbean.qualifier.Qualifier<V>
Type Parameters:
V - the type of a Qualifier's value and of its attribute values
All Implemented Interfaces:
Comparable<Qualifier<V>>, Constable

public final class Qualifier<V> extends Binding<V,Qualifier<V>>
A Binding used to qualify objects.

This is a value-based class.

Author:
Laird Nelson
See Also:
  • Method Details

    • describeConstructor

      Returns a MethodHandleDesc describing the constructor or static method that will be used to create a dynamic constant representing this Qualifier.

      End users have no need to call this method.

      Overrides:
      describeConstructor in class Binding<V,Qualifier<V>>
      Returns:
      a MethodHandleDesc describing the constructor or static method that will be used to create a dynamic constant representing this Qualifier
      Idempotency:
      This method is idempotent and deterministic.
      Nullability:
      This method does not return null.
      Thread Safety:
      This method is safe for concurrent use by multiple threads.
    • of

      public static final <V> Qualifier<V> of(String name)
      Returns a Qualifier, which may or may not be newly created, representing the supplied arguments.
      Type Parameters:
      V - the type of the Qualifier's value and of its attribute values
      Parameters:
      name - the Qualifier's name; must not be null
      Returns:
      a Qualifier
      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

      public static final <V> Qualifier<V> of(String name, V value)
      Returns a Qualifier, which may or may not be newly created, representing the supplied arguments.
      Type Parameters:
      V - the type of the Qualifier's value and of its attribute values
      Parameters:
      name - the Qualifier's name; must not be null
      value - the Qualifier's value; may be null
      Returns:
      a Qualifier
      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

      public static final <V> Qualifier<V> of(String name, V value, Map<? extends String,?> attributes)
      Returns a Qualifier, which may or may not be newly created, representing the supplied arguments.
      Type Parameters:
      V - the type of the Qualifier's value and of its attribute values
      Parameters:
      name - the Qualifier's name; must not be null
      value - the Qualifier's value; may be null
      attributes - the Qualifier's attributes; may be null
      Returns:
      a Qualifier
      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

      public static final <V> Qualifier<V> of(String name, V value, Map<? extends String,?> attributes, Map<? extends String,?> info)
      Returns a Qualifier, which may or may not be newly created, representing the supplied arguments.
      Type Parameters:
      V - the type of the Qualifier's value and of its attribute values
      Parameters:
      name - the Qualifier's name; must not be null
      value - the Qualifier's value; may be null
      attributes - the Qualifier's attributes; may be null
      info - the Qualifier's informational attributes; may be null
      Returns:
      a Qualifier
      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.