Package org.ldaptive.schema
Class Extensions
- java.lang.Object
-
- org.ldaptive.schema.Extensions
-
public class Extensions extends Object
Bean for an extension found in a schema element.
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,List<String>>
extensions
Extensions.private static int
HASH_CODE_SEED
hash code seed.
-
Constructor Summary
Constructors Constructor Description Extensions()
Creates a new extensions.Extensions(String name, List<String> values)
Creates a new extensions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExtension(String name)
Adds an extension.void
addExtension(String name, List<String> values)
Adds an extension.boolean
equals(Object o)
String
format()
Returns this extension as formatted string per RFC 4512.Map<String,List<String>>
getAllValues()
Returns all the values in this extensions.Set<String>
getNames()
Returns the name.String
getValue(String name)
Returns a single string value for the extension with the supplied name.List<String>
getValues(String name)
Returns the values for the extension with the supplied name.int
hashCode()
boolean
isEmpty()
Returns whether the number of extensions is zero.int
size()
Returns the number of extensions in the underlying map.String
toString()
-
-
-
Field Detail
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
-
Method Detail
-
getValues
public List<String> getValues(String name)
Returns the values for the extension with the supplied name.- Parameters:
name
- of the extension- Returns:
- values
-
getValue
public String getValue(String name)
Returns a single string value for the extension with the supplied name. SeegetValues(String)
.- Parameters:
name
- of the extension- Returns:
- single string extension value
-
getAllValues
public Map<String,List<String>> getAllValues()
Returns all the values in this extensions.- Returns:
- map of name to values for every extension
-
addExtension
public void addExtension(String name)
Adds an extension.- Parameters:
name
- of the extension
-
addExtension
public void addExtension(String name, List<String> values)
Adds an extension.- Parameters:
name
- of the extensionvalues
- in the extension
-
size
public int size()
Returns the number of extensions in the underlying map.- Returns:
- number of extensions
-
isEmpty
public boolean isEmpty()
Returns whether the number of extensions is zero.- Returns:
- whether the number of extensions is zero
-
format
public String format()
Returns this extension as formatted string per RFC 4512.- Returns:
- formatted string
-
-