public class Extensions extends Object
Modifier and Type | Field and Description |
---|---|
protected static Pattern |
DEFINITION_PATTERN
Pattern to match attribute type definitions.
|
private Map<String,List<String>> |
extensions
Extensions.
|
private static int |
HASH_CODE_SEED
hash code seed.
|
Constructor and Description |
---|
Extensions()
Creates a new extensions.
|
Extensions(String name,
List<String> values)
Creates a new extensions.
|
Modifier and Type | Method and 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() |
static Extensions |
parse(String definition)
Parses the supplied definition string and creates an initialized extension.
|
String |
toString() |
protected static final Pattern DEFINITION_PATTERN
private static final int HASH_CODE_SEED
public List<String> getValues(String name)
name
- of the extensionpublic String getValue(String name)
getValues(String)
.name
- of the extensionpublic Map<String,List<String>> getAllValues()
public void addExtension(String name)
name
- of the extensionpublic void addExtension(String name, List<String> values)
name
- of the extensionvalues
- in the extensionpublic static Extensions parse(String definition)
definition
- to parsepublic String format()
Copyright © 2003-2019 Virginia Tech. All Rights Reserved.