java.lang.Object
com.ibm.security.access.extension.authn.credential.Attribute
All Implemented Interfaces:
Serializable

public class Attribute extends Object implements Serializable
This class represents a credential attribute. Credential attribute consists of a name and a value set.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a credential attribute with the specified name.
    Attribute(String name, String value)
    Create a credential attribute with the specified name and a value set containing the specified value.
    Attribute(String name, Set<String> values)
    Create a credential attribute with the specified name and the specified value set.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add the specified value to the value set.
    boolean
    equals(Object object)
    Check whether the specified object is equal to this credential attribute.
    Get the name.
    Get the value set.
    int
    Get the hash code of this credential attribute.
    boolean
    Check whether the specified value is contained in the value set.
    void
    Remove the specified value from the value set of this credential attribute.
    void
    setValues(Set<String> values)
    Set the value set.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Attribute

      public Attribute(String name)
      Create a credential attribute with the specified name. The value set is empty.
      Parameters:
      name - The name.
    • Attribute

      public Attribute(String name, String value)
      Create a credential attribute with the specified name and a value set containing the specified value.
      Parameters:
      name - The name.
      value - The value.
    • Attribute

      public Attribute(String name, Set<String> values)
      Create a credential attribute with the specified name and the specified value set.
      Parameters:
      name - The name.
      values - The value set.
  • Method Details

    • getName

      public String getName()
      Get the name.
      Returns:
      The name.
    • getValues

      public Set<String> getValues()
      Get the value set. If the returned value set is modified, call the method setValues(Set) to persist the modifications.
      Returns:
      The value set.
    • setValues

      public void setValues(Set<String> values)
      Set the value set.
      Parameters:
      values - The value set.
    • addValue

      public void addValue(String value)
      Add the specified value to the value set. If the value set already contains the specified value, the specified value is not added.
      Parameters:
      value - The value.
    • hasValue

      public boolean hasValue(String value)
      Check whether the specified value is contained in the value set.
      Parameters:
      value - The value.
      Returns:
      Whether the specified value is contained in the value set.
    • removeValue

      public void removeValue(String value)
      Remove the specified value from the value set of this credential attribute.
      Parameters:
      value - The value.
    • equals

      public boolean equals(Object object)
      Check whether the specified object is equal to this credential attribute. An object is equal to this credential attribute if and only if (1) the object is an instance of Attribute, and (2) the name of the object is equal to the name of this credential attribute.
      Overrides:
      equals in class Object
      Parameters:
      object - The object.
      Returns:
      Whether the specified object is equal to this credential attribute.
    • hashCode

      public int hashCode()
      Get the hash code of this credential attribute.
      Overrides:
      hashCode in class Object