public class CanonicalMapImpl extends Object implements CanonicalMap
CanonicalMap.CanonicalMapBuilder, CanonicalMap.MutableCanonicalMapPathMap.MutablePathMap<T>, PathMap.PathMapBuilder<T>Dictionary.MutableDictionary<K,V>Keys.MutableKeys<K,V>, Keys.MutableValues<K,V>org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterPropertyorg.refcodes.mixin.TypeAccessor.TypeMutator<T>, org.refcodes.mixin.TypeAccessor.TypeProperty<T>PropertiesAccessorMixin.PropertiesBuilderMixin<T>, PropertiesAccessorMixin.PropertiesMixin, PropertiesAccessorMixin.PropertiesMutatorMixin| Modifier and Type | Field and Description |
|---|---|
protected CanonicalMap.CanonicalMapBuilder |
_canonicalMap |
DEFAULT_COMMENT| Constructor and Description |
|---|
CanonicalMapImpl(Map<?,?> aProperties)
Instantiates a new canonical map impl.
|
CanonicalMapImpl(Object aObject)
Instantiates a new canonical map impl.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(Object aKey)
Tests whether there is an element with the given key.
|
String |
get(Object aKey)
Retrieves the element assigned to the given key.
|
char |
getDelimiter() |
Class<String> |
getType() |
boolean |
isEmpty()
Tests whether the accumulation is empty or not.
|
Set<String> |
keySet()
Retrieves a collection containing all the keys found in the elements of
this collection.
|
CanonicalMap |
retrieveFrom(String aFromPath)
|
CanonicalMap |
retrieveTo(String aToPath)
|
int |
size()
Returns the number of data elements contained in the collection.
|
Object |
toDataStructure(String aPath)
Similar to the
PathMap.toMap(String) method, though in case all the keys
of a nested Map instance (applicable to the root Map as
well) represent an array (as of PathMap.getArray( String)), then an
array is generated where the index of each value in the Map is
represented by the number representation of the Map's key for
that value. |
Collection<String> |
values()
Returns a
Collection view of the values related to the contained
keys. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsValue, retrieve, toInstance, toInstance, toType, toTypedirectories, directories, entries, entries, fromExternalKey, getArray, getArray, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toExternalKey, toMap, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toRootPathcontainsKey, get, getBoolean, getBoolean, getByte, getByte, getCharacter, getCharacter, getDouble, getDouble, getFloat, getFloat, getInteger, getInteger, getLong, getLong, getShort, getShort, use, useBoolean, useBoolean, useByte, useByte, useDouble, useDouble, useFloat, useFloat, useInteger, useInteger, useLong, useLong, useShort, useShortprotected CanonicalMap.CanonicalMapBuilder _canonicalMap
public CanonicalMapImpl(Object aObject)
aObject - the a objectpublic CanonicalMapImpl(Map<?,?> aProperties)
aProperties - the a propertiespublic boolean containsKey(Object aKey)
containsKey in interface Keys<String,String>aKey - The key for which to test whether there is an element.public Set<String> keySet()
public Collection<String> values()
Collection view of the values related to the contained
keys.values in interface Keys<String,String>Collection view of the values related to the contained
keys.public int size()
size in interface Containablepublic boolean isEmpty()
isEmpty in interface Containablepublic CanonicalMap retrieveFrom(String aFromPath)
PathMap from the elements of this PathMap
found below the "from-path". The sub-paths will be the root paths for the
new PathMap.
Given we have a value for path "/dog/cat" in the PathMap and we
call PathMap.retrieveFrom(String) with "/dog", then the resulting
PathMap will contain the path "/cat" for that value.retrieveFrom in interface CanonicalMapretrieveFrom in interface PathMap<String>aFromPath - The path from where to start extracting the paths.PathMap with the elements below the provided path
which are root elements in the new PathMap.public CanonicalMap retrieveTo(String aToPath)
PathMap from this PathMap's elements with
the paths relocated to the provided "to-path".
Given we have a value for path "/dog/cat" in the PathMap and we
call PathMap.retrieveTo(String) with "/animals", then the resulting
PathMap will contain the path "/animals/dog/cat" for that value.retrieveTo in interface CanonicalMapretrieveTo in interface PathMap<String>aToPath - The path where to relocate the paths of this
PathMap to.PathMap with the elements from the provided
PathMap with accordingly relocated paths.public char getDelimiter()
getDelimiter in interface org.refcodes.mixin.DelimiterAccessorpublic Class<String> getType()
getType in interface org.refcodes.mixin.TypeAccessor<String>public Object toDataStructure(String aPath)
PathMap.toMap(String) method, though in case all the keys
of a nested Map instance (applicable to the root Map as
well) represent an array (as of PathMap.getArray( String)), then an
array is generated where the index of each value in the Map is
represented by the number representation of the Map's key for
that value. The result is a data structure consisting of Map
instances and arrays.toDataStructure in interface PathMap<String>aPath - The path below which the PathMap to be converted
into a data structure.Map instances and
arrays representing the data below the given path.Copyright © 2017. All rights reserved.