V - The type of the value in the association.public final class Dictionary<V> extends Map<java.lang.String,V>
Map whose keys
are always of type String. The implementation dynamically scales up and down
the size of the underlying data structures as the number elements changes over time.| Constructor and Description |
|---|
Dictionary()
This constructor creates a new empty dictionary.
|
Dictionary(Collection<java.lang.String> keys,
Collection<V> values)
This constructor creates a new dictionary using the specified keys and values.
|
Dictionary(Map<java.lang.String,V> elements)
This constructor creates a new dictionary using the elements provided in the specified map.
|
Dictionary(java.util.Map<java.lang.String,V> elements)
This constructor creates a new dictionary using the elements provided in a java map.
|
Dictionary(java.lang.String[] keys,
V[] values)
This constructor creates a new dictionary using the specified key and value arrays.
|
| Modifier and Type | Method and Description |
|---|---|
static <V> Dictionary<V> |
concatenate(Dictionary<V> dictionary1,
Dictionary<V> dictionary2)
This function returns a new dictionary that contains the all the associations from
both the specified dictionaries.
|
Dictionary<V> |
copy() |
static <V> Dictionary<V> |
reduce(Dictionary<V> dictionary,
Set<java.lang.String> keys)
This function returns a new dictionary that contains only the associations with
the specified keys.
|
addElement, associateKeyWithValue, concatenate, containsElement, createDefaultIterator, createDefaultManipulator, getAssociations, getElementAtIndex, getElementsInRange, getIndexOfElement, getKeys, getNumberOfElements, getValueForKey, getValues, reduce, removeAllElements, removeElement, removeValueForKey, toMapconcatenate, shuffleElements, sortElements, sortElements, sortElementsaddElements, addElements, removeElements, removeElementscompareTo, containsAllElementsIn, containsAnyElementsIn, equals, hashCode, isEmpty, iterator, normalizedIndex, toArrayaddSerializableClass, addSerializableClass, toExposedString, toString, toStringpublic Dictionary()
public Dictionary(java.lang.String[] keys,
V[] values)
keys - The array of keys that should be used to create the dictionary.values - The array of values that should be used to create the dictionary.public Dictionary(Collection<java.lang.String> keys, Collection<V> values)
keys - The keys that should be used to create the dictionary.values - The values that should be used to create the dictionary.public Dictionary(Map<java.lang.String,V> elements)
elements - The dictionary containing the key-value pairs to be mapped.public Dictionary(java.util.Map<java.lang.String,V> elements)
elements - The java map containing the key-value pairs to be mapped.public Dictionary<V> copy()
public static <V> Dictionary<V> concatenate(Dictionary<V> dictionary1, Dictionary<V> dictionary2)
V - The type of value contained in the dictionaries.dictionary1 - The first dictionary whose elements are to be added.dictionary2 - The second dictionary whose elements are to be added.public static <V> Dictionary<V> reduce(Dictionary<V> dictionary, Set<java.lang.String> keys)
V - The type of value contained in the dictionaries.dictionary - The dictionary whose elements are to be reduced.keys - The set of keys for the associates to be saved.Copyright © 2015 Crater Dog Technologies(TM). All rights reserved.