Package org.refcodes.structure
Class CanonicalMapBuilderImpl
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.String,T>
-
- org.refcodes.structure.PathMapBuilderImpl<java.lang.String>
-
- org.refcodes.structure.CanonicalMapBuilderImpl
-
- All Implemented Interfaces:
java.util.Map<java.lang.String,T>
,org.refcodes.mixin.DelimiterAccessor
,org.refcodes.mixin.Dumpable
,org.refcodes.mixin.TypeAccessor<java.lang.String>
,CanonicalMap
,CanonicalMap.CanonicalMapBuilder
,CanonicalMap.MutableCanonicalMap
,Clearable
,Containable
,Dictionary<java.lang.String,T>
,Dictionary.MutableDictionary<java.lang.String,T>
,Dictionary.MutableDictionary.DictionaryBuilder<java.lang.String,T,PathMap.PathMapBuilder<T>>
,Keys<java.lang.String,T>
,Keys.MutableKeys<java.lang.String,T>
,Keys.MutableValues<java.lang.String,T>
,PathMap<java.lang.String>
,PathMap.MutablePathMap<java.lang.String>
,PathMap.PathMapBuilder<java.lang.String>
,PropertiesAccessorMixin
,PropertiesAccessorMixin.PropertiesBuilderMixin<java.lang.String>
,PropertiesAccessorMixin.PropertiesMixin
,PropertiesAccessorMixin.PropertiesMutatorMixin
public class CanonicalMapBuilderImpl extends PathMapBuilderImpl<java.lang.String> implements CanonicalMap.CanonicalMapBuilder
The Class CanonicalMapBuilderImpl.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,V extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.structure.CanonicalMap
CanonicalMap.CanonicalMapBuilder, CanonicalMap.MutableCanonicalMap
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.DelimiterAccessor
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
-
Nested classes/interfaces inherited from interface org.refcodes.structure.Dictionary
Dictionary.MutableDictionary<K,V>
-
Nested classes/interfaces inherited from interface org.refcodes.structure.Dictionary.MutableDictionary
Dictionary.MutableDictionary.DictionaryBuilder<K,V,B extends Dictionary.MutableDictionary.DictionaryBuilder<K,V,B>>
-
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K extends java.lang.Object,V extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.structure.PathMap
PathMap.MutablePathMap<T>, PathMap.PathMapBuilder<T>
-
Nested classes/interfaces inherited from interface org.refcodes.structure.PropertiesAccessorMixin
PropertiesAccessorMixin.PropertiesBuilderMixin<T>, PropertiesAccessorMixin.PropertiesMixin, PropertiesAccessorMixin.PropertiesMutatorMixin
-
-
Field Summary
-
Fields inherited from interface org.refcodes.structure.CanonicalMap
DEFAULT_COMMENT
-
-
Constructor Summary
Constructors Constructor Description CanonicalMapBuilderImpl()
Instantiates a new canonical map builder impl.CanonicalMapBuilderImpl(java.lang.Object aObj)
Instantiates a new canonical map builder impl.CanonicalMapBuilderImpl(java.util.Map<?,?> aProperties)
Instantiates a new canonical map builder impl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CanonicalMap
retrieveFrom(java.lang.String aFromPath)
CanonicalMap
retrieveTo(java.lang.String aToPath)
-
Methods inherited from interface org.refcodes.structure.CanonicalMap
getIndexed, getIndexed, query, query, queryFrom, queryTo, retrieve, retrieveFrom, retrieveFrom, retrieveTo, retrieveTo, retrieveTo, toInstance, toInstance, toType, toType
-
Methods inherited from interface org.refcodes.structure.CanonicalMap.CanonicalMapBuilder
withInsert, withInsert, withInsert, withInsert, withInsertFrom, withInsertFrom, withInsertTo, withInsertTo, withPut, withPut, withPutBoolean, withPutByte, withPutDouble, withPutFloat, withPutInteger, withPutLong, withPutShort, withRemoveFrom
-
Methods inherited from interface org.refcodes.structure.CanonicalMap.MutableCanonicalMap
containsValue, delete, insert, insert, insertFrom, insertTo, put, putAll, putAll, putAll, toDump, toSourceCode, toSourceCode
-
Methods inherited from interface org.refcodes.structure.Containable
isEmpty, size
-
Methods inherited from class java.util.HashMap
clear, clone, containsValue, entrySet, forEach, isEmpty, keySet, putAll, replaceAll, size, values
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entry, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, of, of, of, of, of, of, of, of, of, of, of, ofEntries, put, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.refcodes.structure.PathMap
children, children, children, directories, directories, directories, directories, directories, fromExternalKey, get, get, getArray, getArray, getBoolean, getBoolean, getByte, getByte, getCharacter, getCharacter, getDouble, getDouble, getFloat, getFloat, getIndexes, getIndexes, getInteger, getInteger, getLong, getLong, getRootPath, getShort, getShort, hasChildren, hasChildren, hasChildren, hasIndexed, hasIndexed, hasParentPath, isArray, isArray, isArray, isArray, isArray, isChild, isChild, isChild, isDirectory, isDirectory, isDirectory, isDirectory, isIndexed, isIndexed, isPath, isRecord, isRecord, isRecord, isRecord, isRootPath, keySet, paths, paths, paths, paths, paths, queryPaths, records, records, records, records, records, retrieveFrom, toDataStructure, toDataStructure, toExternalKey, toMap, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath, toPath
-
Methods inherited from interface org.refcodes.structure.PathMap.MutablePathMap
insert, insert, insert, insert, insertFrom, insertFrom, insertTo, insertTo, put, putArray, putArray, remove, remove, removeAll, removeAll, removeFrom, removeFrom, removeFrom, removeFrom
-
Methods inherited from interface org.refcodes.structure.PathMap.PathMapBuilder
withInsert, withInsert, withInsertFrom, withInsertTo
-
Methods inherited from class org.refcodes.structure.PathMapBuilderImpl
compute, computeIfAbsent, computeIfPresent, containsKey, get, getDelimiter, getOrDefault, getType, merge, put, putIfAbsent, remove, remove, replace, replace, toDataStructure
-
Methods inherited from interface org.refcodes.structure.PropertiesAccessorMixin
asArray, asArray, asArray, asArray, asArray, asArray, asBooleanArray, asBooleanArray, asBooleanArray, asBooleanArray, asBooleanArray, asBooleanArray, asByteArray, asByteArray, asByteArray, asByteArray, asByteArray, asByteArray, asCharacterArray, asCharacterArray, asCharacterArray, asCharacterArray, asCharacterArray, asCharacterArray, asDoubleArray, asDoubleArray, asDoubleArray, asDoubleArray, asDoubleArray, asDoubleArray, asFloatArray, asFloatArray, asFloatArray, asFloatArray, asFloatArray, asFloatArray, asIntegerArray, asIntegerArray, asIntegerArray, asIntegerArray, asIntegerArray, asIntegerArray, asLongArray, asLongArray, asLongArray, asLongArray, asLongArray, asLongArray, asShortArray, asShortArray, asShortArray, asShortArray, asShortArray, asShortArray, containsKey, get, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCharacter, getCharacter, getCharacter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInteger, getInteger, getInteger, getLong, getLong, getLong, getShort, getShort, getShort, use, useBoolean, useBoolean, useByte, useByte, useDouble, useDouble, useFloat, useFloat, useInteger, useInteger, useLong, useLong, useShort, useShort
-
Methods inherited from interface org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin
withPut
-
Methods inherited from interface org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
put, put, putBoolean, putBoolean, putByte, putByte, putDouble, putDouble, putFloat, putFloat, putInteger, putInteger, putLong, putLong, putShort, putShort
-
-
-
-
Constructor Detail
-
CanonicalMapBuilderImpl
public CanonicalMapBuilderImpl()
Instantiates a new canonical map builder impl.
-
CanonicalMapBuilderImpl
public CanonicalMapBuilderImpl(java.lang.Object aObj)
Instantiates a new canonical map builder impl.- Parameters:
aObj
- the obj
-
CanonicalMapBuilderImpl
public CanonicalMapBuilderImpl(java.util.Map<?,?> aProperties)
Instantiates a new canonical map builder impl.- Parameters:
aProperties
- the properties
-
-
Method Detail
-
retrieveFrom
public CanonicalMap retrieveFrom(java.lang.String aFromPath)
Extracts a newPathMap
from the elements of thisPathMap
found below the "from-path". The sub-paths will be the root paths for the newPathMap
. Given we have a value for path "/dog/cat" in thePathMap
and we callPathMap.retrieveFrom(String)
with "/dog", then the resultingPathMap
will contain the path "/cat" for that value.- Specified by:
retrieveFrom
in interfaceCanonicalMap
- Specified by:
retrieveFrom
in interfacePathMap<java.lang.String>
- Overrides:
retrieveFrom
in classPathMapBuilderImpl<java.lang.String>
- Parameters:
aFromPath
- The path from where to start extracting the paths.- Returns:
- The
PathMap
with the elements below the provided path which are root elements in the newPathMap
.
-
retrieveTo
public CanonicalMap retrieveTo(java.lang.String aToPath)
Extracts a newPathMap
from thisPathMap
's elements with the paths relocated to the provided "to-path". Given we have a value for path "/dog/cat" in thePathMap
and we callPathMap.retrieveTo(String)
with "/animals", then the resultingPathMap
will contain the path "/animals/dog/cat" for that value.- Specified by:
retrieveTo
in interfaceCanonicalMap
- Specified by:
retrieveTo
in interfacePathMap<java.lang.String>
- Overrides:
retrieveTo
in classPathMapBuilderImpl<java.lang.String>
- Parameters:
aToPath
- The path where to relocate the paths of thisPathMap
to.- Returns:
- The
PathMap
with the elements from the providedPathMap
with accordingly relocated paths.
-
-