|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.tivoli.mts.PDAttrs
This class represents what would be known in the C APIs of Policy Director as an Attrlist, or attribute list. The individual attributes have String names. Values for an attribute may either be Strings or byte arrays. PDAttrs allows an attribute to have more than one value, so attempting to add a value to a name that already has been added to a PDAttrs will result in a multi-valued attribute. PDAttrs, if constructed to do so, will allow duplicate entries in the multi-valued attributes.
Constructor Summary | |
PDAttrs()
Deprecated. user PDAttrs(boolean) instead |
|
PDAttrs(boolean allowDuplicates)
Constructs a new, empty PDAttrs that specifies whether the value for each attribute can consist of an unordered list that allows duplicate items. |
|
PDAttrs(boolean allowDuplicates,
int initialCapacity)
Constructs a new, empty PDAttrs that specifies whether the value for each attribute can consist of an unordered list that allows duplicate items. |
|
PDAttrs(boolean allowDuplicates,
int initialCapacity,
float loadFactor)
Constructs a new, empty PDAttrs that specifies whether the value for each attribute can consist of an unordered list that allows duplicate items. |
|
PDAttrs(int initialCapacity)
Constructs a new, empty PDAttrs with the specified initial capacity and default load factor, which is 0.75. |
|
PDAttrs(int initialCapacity,
float loadFactor)
Constructs a new, empty map with the specified initial capacity and the specified load factor. |
|
PDAttrs(PDAttrs that)
Constructs a new PDAttrs containing the elements in the specified PDAttrs. |
Method Summary | |
java.util.Collection |
add(java.lang.String name,
byte[] value)
Adds the specified byte array value to the collection of values for the specified name in this PDAttrs. |
java.util.Collection |
add(java.lang.String name,
java.util.Collection vals)
Associates the specified values with the specified name in this PDAttrs. |
java.util.Collection |
add(java.lang.String name,
java.lang.Long value)
Adds the specified Long value to the collection of values for the specified name in this PDAttrs. |
java.util.Collection |
add(java.lang.String name,
PDAttrValues vals)
Deprecated. Use add instead |
java.util.Collection |
add(java.lang.String name,
java.lang.String value)
Adds the specified String value to the collection of values for the specified name in this PDAttrs. |
void |
addAll(PDAttrs attrs)
Adds all of the elements in the specified PDAttrs to this PDAttrs. |
boolean |
allowDups()
Returns the current value of allowDups |
void |
clear()
Clear the current PDAttrs. |
java.lang.Object |
clone()
Clone the current PDAttrs. |
boolean |
delete(java.lang.String key)
Remove the named attribute from the PDAttrs. |
byte[] |
encode()
|
java.util.Set |
entrySet()
Return a Set view of the entries in the PDAttrs. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other Object is equal to this one. |
PDAttrValues |
get(java.lang.String key)
Deprecated. Use getValues instead |
int |
getQoP()
Returns the current value of QoP |
java.util.Collection |
getValues(java.lang.String key)
Returns the value(s) to which this PDAttrs maps the specified key. |
int |
hashCode()
Returns a hashcode for the current object. |
java.util.Set |
keySet()
Returns a set view of the keys contained in this PDAttrs. |
void |
setQoP(int qop)
Sets the current value of QoP |
int |
size()
Returns the number of key-values mappings in the current PDAttrs. |
java.lang.String |
toString()
Return a string version of this object. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PDAttrs()
PDAttrs(boolean)
instead
public PDAttrs(int initialCapacity)
initialCapacity
- the initial capacity of thePDAttrspublic PDAttrs(int initialCapacity, float loadFactor)
initialCapacity
- the initial capacity of thePDAttrsloadFactor
- the load factor, which is a measure of how
full the PDAttrs is allowed to get before its capacity is
automatically increased. The default is .75.public PDAttrs(boolean allowDuplicates)
allowDuplicates
- A boolean indicating whether each attribute
value can be an unordered list that allows duplicate itemspublic PDAttrs(boolean allowDuplicates, int initialCapacity)
allowDuplicates
- A boolean indicating whether each attribute
value can be an unordered list that allows duplicate itemsinitialCapacity
- the initial capacity of thePDAttrspublic PDAttrs(boolean allowDuplicates, int initialCapacity, float loadFactor)
allowDuplicates
- A boolean indicating whether each attribute
value can be an unordered list that allows duplicate itemsinitialCapacity
- the initial capacity of thePDAttrsloadFactor
- the load factor, which is a measure of how
full the PDAttrs is allowed to get before its capacity is
automatically increased. The default is .75.public PDAttrs(PDAttrs that) throws java.lang.NullPointerException, java.lang.ClassCastException
that
- the PDAttrs whose elements are to be placed
into this PDAttrsjava.lang.NullPointerException
- if no PDAttrs is passed injava.lang.ClassCastException
- if one or more of the elements in the PDAttrs
to be added are not PDAttr objectsMethod Detail |
public java.util.Collection add(java.lang.String name, PDAttrValues vals)
add
instead
name
- the name of the attributevals
- the new values to be associated with the namejava.lang.NullPointerException
- on parameter errors.public java.util.Collection add(java.lang.String name, java.util.Collection vals)
name
- the name of the attributevals
- the new values to be associated with the name. Must
be either a PDAttrValues
or a
PDAttrValueList
java.lang.NullPointerException
- on parameter errors.public java.util.Collection add(java.lang.String name, java.lang.String value)
name
- the name of the attributevalue
- the new String value to be added for the namejava.lang.NullPointerException
- on parameter errors.public java.util.Collection add(java.lang.String name, java.lang.Long value)
name
- the name of the attributevalue
- the new Long value to be added for the namejava.lang.NullPointerException
- on parameter errors.public java.util.Collection add(java.lang.String name, byte[] value)
name
- the name of the attributevalue
- the new byte array value to be added for the namejava.lang.NullPointerException
- on parameter errors.public void addAll(PDAttrs attrs) throws java.lang.NullPointerException, java.lang.ClassCastException
attrs
- the PDAttrs to be addedjava.lang.NullPointerException
- if no PDAttrs is passedpublic void clear()
public boolean delete(java.lang.String key)
key
- the name of the attribute to be removed.true
if the attribute was in the PDAttrspublic java.lang.Object clone()
public java.util.Set entrySet()
public boolean equals(java.lang.Object obj)
equals
check, which will
devolve into a containsAll check on the current PDAttrs setequals
in class java.lang.Object
obj
- the object to be compared to this onetrue
if the PDAttrs are identical,
false
otherwise.public PDAttrValues get(java.lang.String key)
getValues
instead
null
if the PDAttrs contains no mapping for
the specified key.key
- key whose associated value(s) is/are to be returned.public java.util.Collection getValues(java.lang.String key)
null
if the PDAttrs contains no mapping for
the specified key.key
- key whose associated value(s) is/are to be returned.public int getQoP()
public boolean allowDups()
public int hashCode()
hashCode
in class java.lang.Object
public java.util.Set keySet()
public void setQoP(int qop) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if the QoP value is unknownpublic int size()
public java.lang.String toString()
toString
in class java.lang.Object
public byte[] encode()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |