Package org.ldaptive.schema
Class Extensions
- java.lang.Object
-
- org.ldaptive.AbstractFreezable
-
- org.ldaptive.schema.Extensions
-
- All Implemented Interfaces:
Freezable
public final class Extensions extends AbstractFreezable
Bean for an extension found in a schema element.
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,List<String>>extensionsExtensions.private static intHASH_CODE_SEEDhash 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 voidaddExtension(String name)Adds an extension.voidaddExtension(String name, List<String> values)Adds an extension.booleanequals(Object o)Stringformat()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.StringgetValue(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.inthashCode()booleanisEmpty()Returns whether the number of extensions is zero.intsize()Returns the number of extensions in the underlying map.StringtoString()-
Methods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, freeze, isFrozen
-
-
-
-
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
-
-