|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.util.Association
org.pf.util.NamedValue
org.pf.directory.MultiValueAttribute
public class MultiValueAttribute
An attribute with multiple values associated
| Constructor Summary | |
|---|---|
MultiValueAttribute(java.lang.String attrName)
Initialize the new instance with a name. |
|
MultiValueAttribute(java.lang.String attrName,
boolean encoded)
Initialize the new instance with a name. |
|
| Method Summary | |
|---|---|
void |
addValue(java.lang.Object value)
Add the given value if it not already exists in the attributes values |
void |
addValues(java.util.List values)
Adds all given values to this attribute skipping duplicate values. |
void |
addValues(java.lang.Object[] values)
Adds all given values to this attribute skipping duplicate values. |
boolean |
containsValue(java.lang.Object value)
Returns true if the given value is one of the values of this attribute. |
MultiValueAttribute |
copy()
Returns a copy of this object |
java.lang.Object |
getFirstValue()
Returns the first value of this attribute |
java.lang.String |
getFirstValueAsString()
Returns the first value of this attribute as String |
boolean |
getIgnoreCase()
Returns true if this MultiValueAttribute is treated case-insensitive. |
java.lang.String |
getName()
Returns the name of this attribute |
java.util.List |
getValues()
Returns the values of this attribute |
java.lang.String[] |
getValuesAsStrings()
Returns the values of this attribute as string array |
boolean |
isEmpty()
Returns true if the attribute has no values |
boolean |
mustBeEncoded()
Returns whether or not the value of this attribute must be encoded if written to a stream |
void |
mustBeEncoded(boolean newValue)
Sets whether or not the value of this attribute must be encoded if written to a stream |
void |
setIgnoreCase(boolean newValue)
Sets whether or not this MultiValueAttribute is treated case-insensitive. |
void |
setSoleValue(java.lang.Object value)
Sets the given value as the only value of this attribute |
int |
valueCount()
Returns the number of values associated with this attribute |
| Methods inherited from class org.pf.util.NamedValue |
|---|
compareTo, copyNamedValue, key, key, name, name |
| Methods inherited from class org.pf.util.Association |
|---|
copyAssociation, equals, getKey, getValue, hashCode, key, setValue, toString, value, value |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MultiValueAttribute(java.lang.String attrName)
attrName - The name of the new attribute
public MultiValueAttribute(java.lang.String attrName,
boolean encoded)
attrName - The name of the new attributeencoded - A marker that indicates if the values of this attribute must be encoded| Method Detail |
|---|
public boolean mustBeEncoded()
public void mustBeEncoded(boolean newValue)
public boolean getIgnoreCase()
public void setIgnoreCase(boolean newValue)
public java.lang.String getName()
public java.util.List getValues()
public java.lang.String[] getValuesAsStrings()
java.lang.ClassCastException - If any value of this attribute is not of type Stringpublic java.lang.Object getFirstValue()
public java.lang.String getFirstValueAsString()
java.lang.NullPointerException - if the attribute has no value at allpublic void addValue(java.lang.Object value)
public void addValues(java.lang.Object[] values)
public void addValues(java.util.List values)
public boolean containsValue(java.lang.Object value)
public void setSoleValue(java.lang.Object value)
public MultiValueAttribute copy()
public int valueCount()
public boolean isEmpty()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||