T
- type of valuesprivate class LdapAttribute.LdapAttributeValues<T> extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
private static int |
HASH_CODE_SEED
hash code seed.
|
private static long |
serialVersionUID
serial version uid.
|
private Class<T> |
type
Type of values.
|
private Collection<T> |
values
Collection of values.
|
Constructor and Description |
---|
LdapAttributeValues(Class<T> t)
Creates a new ldap attribute values.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Object o)
Adds the supplied object to this values.
|
private void |
checkValue(Object o)
Determines if the supplied object is acceptable to use in this values.
|
void |
clear()
Removes all the values.
|
protected Collection<byte[]> |
convertValuesToByteArray(Collection<String> v)
UTF-8 encodes the supplied collection of values.
|
protected Collection<String> |
convertValuesToString(Collection<byte[]> v)
Base64 encodes the supplied collection of values.
|
boolean |
equals(Object o) |
Collection<byte[]> |
getBinaryValues()
Returns the values in binary format.
|
Collection<String> |
getStringValues()
Returns the values in string format.
|
int |
hashCode() |
boolean |
isType(Class<?> c)
Returns whether this ldap attribute values is of the supplied type.
|
void |
remove(Object o)
Removes the supplied object from this values if it exists.
|
int |
size()
Returns the number of values.
|
String |
toString() |
private static final int HASH_CODE_SEED
private static final long serialVersionUID
private final Collection<T> values
LdapAttributeValues(Class<T> t)
t
- type of valuesIllegalArgumentException
- if t is not a String or byte[]public boolean isType(Class<?> c)
c
- type to checkpublic Collection<String> getStringValues()
convertValuesToString(Collection)
.public Collection<byte[]> getBinaryValues()
convertValuesToByteArray(Collection)
.public void add(Object o)
o
- to addIllegalArgumentException
- if o is null or if o is not the correct typepublic void remove(Object o)
o
- to removeIllegalArgumentException
- if o is null or if o is not the correct typeprivate void checkValue(Object o)
o
- object to checkIllegalArgumentException
- if o is null or if o is not the correct typepublic int size()
public void clear()
protected Collection<String> convertValuesToString(Collection<byte[]> v)
v
- values to encodeprotected Collection<byte[]> convertValuesToByteArray(Collection<String> v)
v
- values to encodeCopyright © 2003-2019 Virginia Tech. All Rights Reserved.