See: Description
Interface | Description |
---|---|
Item<T> |
Marker interface for Items.
|
ListElement<T> |
Marker interface for things that can be elements of Outer Lists.
|
NumberItem<T> |
Common interface for all
Type s that can carry numbers. |
Parametrizable<T> |
Common interface for all
Type s that can carry Parameters . |
Type<T> |
Base interface for Structured Data Types.
|
Class | Description |
---|---|
BooleanItem |
Represents a Boolean.
|
ByteSequenceItem |
Represents a Byte Sequence.
|
DecimalItem |
Represents a Decimal.
|
Dictionary |
Represents a Dictionary.
|
InnerList |
Represents an Inner List.
|
IntegerItem |
Represents an Integer.
|
OuterList |
Represents a List.
|
Parameters |
Represents the Parameters of an Item or an Inner List.
|
Parser |
Implementation of the "Structured Field Values" Parser.
|
StringItem |
Represents a String.
|
TokenItem |
Represents a Token.
|
Utils |
Common utility methods.
|
Exception | Description |
---|---|
ParseException |
IllegalArgumentException , augmented with details. |
Includes a Parser
and object equivalents of the defined data types
(see Type
).
Here's a minimal example:
{
Parser p = new Parser("a=?0, b, c; foo=bar");
Dictionary d = p.parseDictionary();
for (Map.Entry<String, Item<? extends Object>> e : d.get()) {
String key = e.getKey();
Item<? extends Object> item = e.getValue();
Object value = item.get();
Parameters params = item.getParams();
System.out.println(key + " -> " + value + (params.isEmpty() ? "" : (" (" + params.serialize() + ")")));
}
}
gives:
a -> false b -> true c -> true (;foo=bar)
Copyright © 2021 The Apache Software Foundation. All rights reserved.