public final class AttributeDescription extends Object implements Comparable<AttributeDescription>
AttributeDescription.| Modifier and Type | Method and Description |
|---|---|
static int |
compare(AttributeType attrType1,
Set<String> options1,
AttributeType attrType2,
Set<String> options2)
Compares the first attribute type and options to the second attribute type and options, as if
they were both instances of
AttributeDescription. |
int |
compareTo(AttributeDescription other) |
static boolean |
containsAllOptions(Collection<String> options1,
Collection<String> options2)
Indicates whether the provided first set of not normalized options contains all values from the
second set of not normalized options.
|
static boolean |
containsOption(Set<String> options,
String optionToFind)
Indicates whether the provided set of not normalized options contains the provided option.
|
static AttributeDescription |
create(Attribute attr)
Creates an attribute description with the attribute type and options of the provided
Attribute. |
static AttributeDescription |
create(AttributeType attributeType,
Set<String> options)
Creates an attribute description having the provided attribute type and options.
|
boolean |
equals(Object obj) |
AttributeType |
getAttributeType()
Returns the attribute type associated with this attribute description.
|
Set<String> |
getOptions()
Returns the set of not normalized options contained in this attribute description.
|
int |
hashCode() |
static boolean |
optionsEqual(Set<String> options1,
Set<String> options2)
Indicates whether the provided first set of not normalized options equals the second set of not
normalized options.
|
String |
toString() |
public static AttributeDescription create(Attribute attr)
Attribute.attr - The attribute.NullPointerException - If attributeType or options was null.public static AttributeDescription create(AttributeType attributeType, Set<String> options)
attributeType - The attribute type.options - The attribute options.NullPointerException - If attributeType or options was null.public AttributeType getAttributeType()
public Set<String> getOptions()
public static boolean containsOption(Set<String> options, String optionToFind)
options - The set of not normalized options where to do the search.optionToFind - The option for which to make the determination.true if the provided set of options has the provided option, or false
if not.public static boolean containsAllOptions(Collection<String> options1, Collection<String> options2)
options1 - The first set of not normalized options where to do the search.options2 - The second set of not normalized options that must all be found.true if the first provided set of options has all the options from the second
provided set of options.public static boolean optionsEqual(Set<String> options1, Set<String> options2)
options1 - The first set of not normalized options.options2 - The second set of not normalized options.true if the first provided set of options equals the second provided set of
options.public int compareTo(AttributeDescription other)
compareTo in interface Comparable<AttributeDescription>public static int compare(AttributeType attrType1, Set<String> options1, AttributeType attrType2, Set<String> options2)
AttributeDescription.
The attribute types are compared first and then, if equal, the options are normalized, sorted, and compared.
attrType1 - The first attribute type to be compared.options1 - The first options to be compared.attrType2 - The second attribute type to be compared.options2 - The second options to be compared.NullPointerException - If name was null.compareTo(AttributeDescription)Copyright © 2010-2018 ForgeRock AS. All Rights Reserved.