|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.Attribute
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public class Attribute
This class defines a data structure for storing and interacting with an attribute that may be used in the Directory Server.
Constructor Summary | |
---|---|
Attribute(AttributeType attributeType)
Creates a new attribute with the specified type. |
|
Attribute(AttributeType attributeType,
java.lang.String name)
Creates a new attribute with the specified type and user-provided name. |
|
Attribute(AttributeType attributeType,
java.lang.String name,
java.util.LinkedHashSet<AttributeValue> values)
Creates a new attribute with the specified type, user-provided name, and set of values. |
|
Attribute(AttributeType attributeType,
java.lang.String name,
java.util.LinkedHashSet<java.lang.String> options,
java.util.LinkedHashSet<AttributeValue> values)
Creates a new attribute with the specified type, user-provided name, and set of values. |
|
Attribute(java.lang.String lowerName,
java.lang.String valueString)
Creates a new attribute with the specified name and value. |
Method Summary | |
---|---|
ConditionResult |
approximatelyEqualTo(AttributeValue value)
Indicates whether this attribute has any value(s) that are approximately equal to the provided value. |
Attribute |
duplicate()
Creates a duplicate of this attribute that can be modified without impacting this attribute. |
Attribute |
duplicate(boolean omitValues)
Creates a duplicate of this attribute that can be modified without impacting this attribute. |
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is an attribute that is equal to this attribute. |
AttributeType |
getAttributeType()
Retrieves the attribute type for this attribute. |
java.lang.String |
getName()
Retrieves the user-provided name for this attribute. |
java.lang.String |
getNameWithOptions()
Retrieves the user-provided name of the attribute, along with any options that might have been provided. |
java.util.LinkedHashSet<java.lang.String> |
getOptions()
Retrieves the set of attribute options for this attribute. |
java.util.LinkedHashSet<AttributeValue> |
getValues()
Retrieves the set of values for this attribute. |
ConditionResult |
greaterThanOrEqualTo(AttributeValue value)
Indicates whether this attribute has any value(s) that are greater than or equal to the provided value. |
boolean |
hasAllValues(java.util.Collection<AttributeValue> values)
Indicates whether this attribute contains all the values in the collection. |
boolean |
hasAnyValue(java.util.Collection<AttributeValue> values)
Indicates whether this attribute contains any of the values in the collection. |
int |
hashCode()
Retrieves the hash code for this attribute. |
boolean |
hasOption(java.lang.String option)
Indicates whether this attribute has the specified option. |
boolean |
hasOptions()
Indicates whether this attribute has any options at all. |
boolean |
hasOptions(java.util.Collection<java.lang.String> options)
Indicates whether this attribute has all of the options in the provided collection. |
boolean |
hasValue()
Indicates whether this attribute contains one or more values. |
boolean |
hasValue(AttributeValue value)
Indicates whether this attribute contains the specified value. |
boolean |
isVirtual()
Indicates whether this is a virtual attribute rather than a real attribute. |
ConditionResult |
lessThanOrEqualTo(AttributeValue value)
Indicates whether this attribute has any value(s) that are less than or equal to the provided value. |
ConditionResult |
matchesSubstring(ByteString subInitial,
java.util.List<ByteString> subAny,
ByteString subFinal)
Indicates whether this attribute has any value(s) that match the provided substring. |
boolean |
optionsEqual(java.util.Set<java.lang.String> options)
Indicates whether this attribute has exactly the set of options in the provided set. |
void |
setValues(java.util.LinkedHashSet<AttributeValue> values)
Specifies the set of values for this attribute. |
java.lang.String |
toLDIF()
Retrieves a string representation of this attribute in LDIF form. |
void |
toLDIF(java.lang.StringBuilder buffer)
Appends a string representation of this attribute in LDIF form to the provided buffer. |
java.lang.String |
toString()
Retrieves a one-line string representation of this attribute. |
void |
toString(java.lang.StringBuilder buffer)
Appends a one-line string representation of this attribute to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Attribute(AttributeType attributeType)
attributeType
- The attribute type for this attribute.public Attribute(AttributeType attributeType, java.lang.String name)
attributeType
- The attribute type for this attribute.name
- The user-provided name for this attribute.public Attribute(AttributeType attributeType, java.lang.String name, java.util.LinkedHashSet<AttributeValue> values)
attributeType
- The attribute type for this attribute.name
- The user-provided name for this attribute.values
- The set of values for this attribute.public Attribute(java.lang.String lowerName, java.lang.String valueString)
lowerName
- The name or OID of the attribute type for
this attribute, formatted in all lowercase
characters.valueString
- The String representation of the attribute
value.public Attribute(AttributeType attributeType, java.lang.String name, java.util.LinkedHashSet<java.lang.String> options, java.util.LinkedHashSet<AttributeValue> values)
attributeType
- The attribute type for this attribute.name
- The user-provided name for this attribute.options
- The set of options for this attribute.values
- The set of values for this attribute.Method Detail |
---|
public AttributeType getAttributeType()
public java.lang.String getName()
public java.lang.String getNameWithOptions()
public java.util.LinkedHashSet<java.lang.String> getOptions()
public boolean hasOption(java.lang.String option)
option
- The option for which to make the determination.
true
if this attribute has the specified
option, or false
if not.public boolean hasOptions()
true
if this attribute has at least one
option, or false
if not.public boolean hasOptions(java.util.Collection<java.lang.String> options)
options
- The collection of options for which to make the
determination.
true
if this attribute has all of the
specified options, or false
if it does not
have at least one of them.public boolean optionsEqual(java.util.Set<java.lang.String> options)
options
- The set of options for which to make the
determination.
true
if this attribute has exactly the
specified set of options, or false
if the
set of options is different in any way.public java.util.LinkedHashSet<AttributeValue> getValues()
public void setValues(java.util.LinkedHashSet<AttributeValue> values)
values
- The set of values for this attribute.public boolean hasValue()
true
if this attribute contains one or more
values, or false
if it does not.public boolean hasValue(AttributeValue value)
value
- The value for which to make the determination.
true
if this attribute has the specified
value, or false
if not.public boolean hasAllValues(java.util.Collection<AttributeValue> values)
values
- The set of values for which to make the
determination.
true
if this attribute contains all the
values in the provided collection, or false
if it does not contain at least one of them.public boolean hasAnyValue(java.util.Collection<AttributeValue> values)
values
- The set of values for which to make the
determination.
true
if this attribute contains at least
one of the values in the provided collection, or
false
if it does not contain any of the
values.public ConditionResult matchesSubstring(ByteString subInitial, java.util.List<ByteString> subAny, ByteString subFinal)
subInitial
- The subInitial component to use in the
determination.subAny
- The subAny components to use in the
determination.subFinal
- The subFinal component to use in the
determination.
UNDEFINED
if this attribute does not have a
substring matching rule, TRUE
if at least
one value matches the provided substring, or
FALSE
otherwise.public ConditionResult greaterThanOrEqualTo(AttributeValue value)
value
- The value for which to make the determination.
UNDEFINED
if this attribute does not have
an ordering matching rule, TRUE
if at least
one value is greater than or equal to the provided
value, or false
otherwise.public ConditionResult lessThanOrEqualTo(AttributeValue value)
value
- The value for which to make the determination.
UNDEFINED
if this attribute does not have
an ordering matching rule, TRUE
if at least
one value is less than or equal to the provided value,
or false
otherwise.public ConditionResult approximatelyEqualTo(AttributeValue value)
value
- The value for which to make the determination.
UNDEFINED
if this attribute does not have
an approximate matching rule, TRUE
if at
least one value is approximately equal to the provided
value, or false
otherwise.public boolean isVirtual()
true
if this is a virtual attribute, or
false
if it is a real attribute.public Attribute duplicate()
public Attribute duplicate(boolean omitValues)
omitValues
- true
if the values should be
omitted.
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object for which to make the determination.
true
if the provided object is an attribute
that is equal to this attribute, or false
if not.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the information should be
appended.public java.lang.String toLDIF()
public void toLDIF(java.lang.StringBuilder buffer)
buffer
- The buffer to which the information should be
appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |