T
- the generic typepublic class PathMapBuilderImpl<T> extends HashMap<String,T> implements PathMap.PathMapBuilder<T>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
PathMap.MutablePathMap<T>, PathMap.PathMapBuilder<T>
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
org.refcodes.mixin.TypeAccessor.TypeMutator<T>, org.refcodes.mixin.TypeAccessor.TypeProperty<T>
Dictionary.MutableDictionary.DictionaryBuilder<K,V,B extends Dictionary.MutableDictionary.DictionaryBuilder<K,V,B>>
Dictionary.MutableDictionary<K,V>
Constructor and Description |
---|
PathMapBuilderImpl(char aDelimiter,
Class<T> aType)
Instantiates a new path map builder impl.
|
PathMapBuilderImpl(Class<T> aType)
Instantiates a new path map builder impl.
|
PathMapBuilderImpl(Object aObj,
char aDelimiter,
Class<T> aType)
Instantiates a new path map builder impl.
|
PathMapBuilderImpl(Object aObj,
Class<T> aType)
Instantiates a new path map builder impl.
|
PathMapBuilderImpl(Object aObj,
String aFromPath,
char aDelimiter,
Class<T> aType)
Instantiates a new path map builder impl.
|
PathMapBuilderImpl(Object aObj,
String aFromPath,
Class<T> aType)
Instantiates a new path map builder impl.
|
PathMapBuilderImpl(String aToPath,
Object aObj,
char aDelimiter,
Class<T> aType)
Instantiates a new path map builder impl.
|
PathMapBuilderImpl(String aToPath,
Object aObj,
Class<T> aType)
Instantiates a new path map builder impl.
|
PathMapBuilderImpl(String aToPath,
Object aObj,
String aFromPath,
char aDelimiter,
Class<T> aType)
Instantiates a new path map builder impl.
|
PathMapBuilderImpl(String aToPath,
Object aObj,
String aFromPath,
Class<T> aType)
Instantiates a new path map builder impl.
|
Modifier and Type | Method and Description |
---|---|
T |
compute(String aPath,
BiFunction<? super String,? super T,? extends T> remappingFunction) |
T |
computeIfAbsent(String aPath,
Function<? super String,? extends T> mappingFunction) |
T |
computeIfPresent(String aPath,
BiFunction<? super String,? super T,? extends T> remappingFunction) |
boolean |
containsKey(Object aPath)
Tests whether there is an element with the given key.
|
T |
get(Object aPath)
Retrieves the element assigned to the given key.
|
char |
getDelimiter() |
T |
getOrDefault(Object aPath,
T publicValue) |
Class<T> |
getType() |
T |
merge(String aPath,
T value,
BiFunction<? super T,? super T,? extends T> remappingFunction) |
T |
put(String aPath,
T value)
Puts an element identified by the given key.
|
T |
putIfAbsent(String aPath,
T value) |
T |
remove(Object aPath) |
boolean |
remove(Object aPath,
Object value) |
T |
replace(String aPath,
T value) |
boolean |
replace(String aPath,
T oldValue,
T newValue) |
PathMap.PathMapBuilder<T> |
retrieveFrom(String aFromPath)
Retrieve from.
|
PathMap.PathMapBuilder<T> |
retrieveTo(String aToPath)
Retrieve to.
|
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. |
clear, clone, containsValue, entrySet, forEach, isEmpty, keySet, putAll, replaceAll, size, values
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
retrieve, toPathMap, toPathMap, toPathMap, toPathMap, toPathMap, toPathMap, toPathMapBuilder, toPathMapBuilder, toPathMapBuilder, toPathMapBuilder, withInsert, withInsert, withInsertFrom, withInsertTo, withPut, withPut, withRemoveFrom
delete, insert, insert, insertFrom, insertTo, put, put, putArray, putArray, removeAll
directories, directories, entries, entries, getArray, getArray, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toMap, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPathMap, toPathMap, toRootPath
clear, containsValue, entrySet, equals, forEach, hashCode, isEmpty, keySet, putAll, replaceAll, size, values
isEmpty, size
public PathMapBuilderImpl(Class<T> aType)
aType
- the a typepublic PathMapBuilderImpl(char aDelimiter, Class<T> aType)
aDelimiter
- the a delimiteraType
- the a typepublic PathMapBuilderImpl(Object aObj, Class<T> aType)
aObj
- the a objaType
- the a typepublic PathMapBuilderImpl(String aToPath, Object aObj, Class<T> aType)
aToPath
- the a to pathaObj
- the a objaType
- the a typepublic PathMapBuilderImpl(Object aObj, String aFromPath, Class<T> aType)
aObj
- the a objaFromPath
- the a from pathaType
- the a typepublic PathMapBuilderImpl(String aToPath, Object aObj, String aFromPath, Class<T> aType)
aToPath
- the a to pathaObj
- the a objaFromPath
- the a from pathaType
- the a typepublic PathMapBuilderImpl(Object aObj, char aDelimiter, Class<T> aType)
aObj
- the a objaDelimiter
- the a delimiteraType
- the a typepublic PathMapBuilderImpl(String aToPath, Object aObj, char aDelimiter, Class<T> aType)
aToPath
- the a to pathaObj
- the a objaDelimiter
- the a delimiteraType
- the a typepublic PathMapBuilderImpl(Object aObj, String aFromPath, char aDelimiter, Class<T> aType)
aObj
- the a objaFromPath
- the a from pathaDelimiter
- the a delimiteraType
- the a typepublic boolean containsKey(Object aPath)
Keys
containsKey
in interface Map<String,T>
containsKey
in interface Keys<String,T>
containsKey
in class HashMap<String,T>
aPath
- The key for which to test whether there is an element.public T get(Object aPath)
Keys
public T put(String aPath, T value)
Keys.MutableValues
public T getOrDefault(Object aPath, T publicValue)
getOrDefault
in interface Map<String,T>
getOrDefault
in class HashMap<String,T>
public T putIfAbsent(String aPath, T value)
putIfAbsent
in interface Map<String,T>
putIfAbsent
in class HashMap<String,T>
public T computeIfAbsent(String aPath, Function<? super String,? extends T> mappingFunction)
computeIfAbsent
in interface Map<String,T>
computeIfAbsent
in class HashMap<String,T>
public T computeIfPresent(String aPath, BiFunction<? super String,? super T,? extends T> remappingFunction)
computeIfPresent
in interface Map<String,T>
computeIfPresent
in class HashMap<String,T>
public T compute(String aPath, BiFunction<? super String,? super T,? extends T> remappingFunction)
public T merge(String aPath, T value, BiFunction<? super T,? super T,? extends T> remappingFunction)
public PathMap.PathMapBuilder<T> retrieveTo(String aToPath)
PathMap.PathMapBuilder
retrieveTo
in interface PathMap<T>
retrieveTo
in interface PathMap.MutablePathMap<T>
retrieveTo
in interface PathMap.PathMapBuilder<T>
aToPath
- the a to pathpublic PathMap.PathMapBuilder<T> retrieveFrom(String aFromPath)
PathMap.PathMapBuilder
retrieveFrom
in interface PathMap<T>
retrieveFrom
in interface PathMap.MutablePathMap<T>
retrieveFrom
in interface PathMap.PathMapBuilder<T>
aFromPath
- the a from pathpublic char getDelimiter()
getDelimiter
in interface org.refcodes.mixin.DelimiterAccessor
public Class<T> getType()
getType
in interface org.refcodes.mixin.TypeAccessor<T>
public Object toDataStructure(String aPath)
PathMap
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<T>
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.