|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.fge.jsonschema.core.util.Dictionary<T>
T - the type of values for this dictionary@Immutable public final class Dictionary<T>
A dictionary
This class is a wrapper over a Map, where keys are always Strings. The type of values is arbitrary.
This class is immutable. If you want to build a dictionary, you have two options:
newBuilder();thaw().For instance:
// New builder
final DictionaryBuilder<Foo> builder = Dictionary.newBuilder();
// From an existing dictionary
final DictionaryBuilder<Foo> builder = dict.thaw();
DictionaryBuilder| Method Summary | ||
|---|---|---|
Map<String,T> |
entries()
Return the entries from this dictionary as a map |
|
static
|
newBuilder()
Return a new, empty builder for a dictionary of this type |
|
DictionaryBuilder<T> |
thaw()
Return a builder with a copy of all entries from this dictionary |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> DictionaryBuilder<T> newBuilder()
T - the type of values
public Map<String,T> entries()
The returned map is immutable.
ImmutableMappublic DictionaryBuilder<T> thaw()
thaw in interface Frozen<DictionaryBuilder<T>>DictionaryBuilder
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||