Package yapion.hierarchy.types
Class YAPIONMap
- java.lang.Object
-
- yapion.hierarchy.api.groups.YAPIONAnyType
-
- yapion.hierarchy.api.groups.YAPIONDataType<YAPIONMap,YAPIONAnyType>
-
- yapion.hierarchy.types.YAPIONMap
-
- All Implemented Interfaces:
java.lang.Iterable<YAPIONAnyType>
,ObjectOutput
,ObjectPath
,ObjectSearch
,ObjectType
,InternalAdd<YAPIONMap,YAPIONAnyType>
,InternalAdvancedOperations<YAPIONMap,YAPIONAnyType>
,InternalRemove<YAPIONMap,YAPIONAnyType>
,InternalRetrieve<YAPIONAnyType>
,MapAdd<YAPIONMap,YAPIONAnyType>
,MapRemove<YAPIONMap,YAPIONAnyType>
,MapRetrieve<YAPIONAnyType>
public class YAPIONMap extends YAPIONDataType<YAPIONMap,YAPIONAnyType> implements MapAdd<YAPIONMap,YAPIONAnyType>, MapRemove<YAPIONMap,YAPIONAnyType>, MapRetrieve<YAPIONAnyType>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface yapion.hierarchy.api.ObjectSearch
ObjectSearch.YAPIONSearchResult<T extends YAPIONAnyType>
-
-
Constructor Summary
Constructors Constructor Description YAPIONMap()
-
Method Summary
Modifier and Type Method Description void
add(@NonNull YAPIONParserMapValue variable)
<C> YAPIONMap
addOrPointer(C key, @NonNull YAPIONAnyType value)
Optional API.<C> YAPIONAnyType
addOrPointerAndGetPrevious(C key, @NonNull YAPIONAnyType value)
Optional API.java.util.Set<YAPIONAnyType>
allKeys()
long
deepSize()
boolean
equals(java.lang.Object o)
void
finishMapping()
java.util.Optional<ObjectSearch.YAPIONSearchResult<? extends YAPIONAnyType>>
get(@NonNull java.lang.String key)
YAPIONAnyType
get(@NonNull YAPIONAnyType key)
java.util.List<YAPIONAnyType>
getAllValues()
java.util.Map<YAPIONAnyType,YAPIONAnyType>
getBackedMap()
Modifying this is an unsafe operation.java.util.List<YAPIONAnyType>
getKeys()
java.lang.String
getPath(YAPIONAnyType yapionAnyType)
YAPIONType
getType()
int
hashCode()
YAPIONMap
internalAdd(@NonNull YAPIONAnyType key, @NonNull YAPIONAnyType value)
YAPIONAnyType
internalAddAndGetPrevious(@NonNull YAPIONAnyType key, @NonNull YAPIONAnyType value)
<T> boolean
internalContainsKey(@NonNull YAPIONAnyType key, java.lang.Class<T> type)
boolean
internalContainsKey(@NonNull YAPIONAnyType key, YAPIONType yapionType)
boolean
internalContainsValue(@NonNull YAPIONAnyType yapionAnyType)
YAPIONAnyType
internalGetYAPIONAnyType(@NonNull YAPIONAnyType key)
YAPIONMap
internalRemove(@NonNull YAPIONAnyType key)
YAPIONAnyType
internalRemoveAndGet(@NonNull YAPIONAnyType key)
boolean
isEmpty()
java.util.Iterator<YAPIONAnyType>
iterator()
YAPIONMap
itself()
int
length()
protected long
referenceValueProvider(ReferenceFunction referenceFunction)
int
size()
<T extends AbstractOutput>
TtoJSON(T abstractOutput)
<T extends AbstractOutput>
TtoJSONLossy(T abstractOutput)
java.lang.String
toString()
<T extends AbstractOutput>
TtoYAPION(T abstractOutput)
-
Methods inherited from class yapion.hierarchy.api.groups.YAPIONAnyType
cacheReferenceValue, copy, discardReferenceValue, get, getDepth, getParent, getPath, getReferenceValue, hasParent, hasReferenceValue, isValuePresent, referenceValue, removeParent, setParent
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface yapion.hierarchy.api.storage.internal.InternalAdvancedOperations
addIfAbsent, addIfAbsent, addIfAbsent, compute, computeIfAbsent, computeIfPresent, forEach, getOrSetDefault, getYAPIONAnyTypeOrSetDefault, getYAPIONArrayOrSetDefault, getYAPIONMapOrSetDefault, getYAPIONObjectOrSetDefault, getYAPIONPointerOrSetDefault, getYAPIONValueOrSetDefault, merge, parallelStream, removeAll, removeIf, removeIf, replace, replaceAll, retainAll, retainIf, retainIf, spliterator, stream
-
Methods inherited from interface yapion.hierarchy.api.storage.internal.InternalRetrieve
internalContainsKey
-
Methods inherited from interface yapion.hierarchy.api.storage.MapAdd
add, addAndGetPrevious, put, putAndGetItself, putOrPointer, putOrPointerAndGetItself
-
Methods inherited from interface yapion.hierarchy.api.storage.MapRemove
remove, removeAndGet
-
Methods inherited from interface yapion.hierarchy.api.storage.MapRetrieve
containsKey, containsKey, containsKey, getArray, getArray, getMap, getMap, getObject, getObject, getPlainValue, getPlainValue, getPlainValueOrDefault, getPointer, getPointer, getValue, getValue, getValue, getValue, getValue, getValue, getValueOrDefault, getValueOrDefault, getYAPIONAnyType, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue, hasValue
-
Methods inherited from interface yapion.hierarchy.api.ObjectType
referenceValue
-
-
-
-
Method Detail
-
getType
public YAPIONType getType()
- Specified by:
getType
in interfaceObjectType
-
referenceValueProvider
protected long referenceValueProvider(ReferenceFunction referenceFunction)
- Overrides:
referenceValueProvider
in classYAPIONAnyType
-
toYAPION
public <T extends AbstractOutput> T toYAPION(T abstractOutput)
- Specified by:
toYAPION
in interfaceObjectOutput
-
toJSON
public <T extends AbstractOutput> T toJSON(T abstractOutput)
- Specified by:
toJSON
in interfaceObjectOutput
-
toJSONLossy
public <T extends AbstractOutput> T toJSONLossy(T abstractOutput)
- Specified by:
toJSONLossy
in interfaceObjectOutput
-
getPath
public java.lang.String getPath(YAPIONAnyType yapionAnyType)
- Specified by:
getPath
in interfaceObjectPath
- Overrides:
getPath
in classYAPIONAnyType
-
getKeys
public java.util.List<YAPIONAnyType> getKeys()
-
internalContainsKey
public boolean internalContainsKey(@NonNull @NonNull YAPIONAnyType key, YAPIONType yapionType)
- Specified by:
internalContainsKey
in interfaceInternalRetrieve<YAPIONAnyType>
-
internalContainsKey
public <T> boolean internalContainsKey(@NonNull @NonNull YAPIONAnyType key, java.lang.Class<T> type)
- Specified by:
internalContainsKey
in interfaceInternalRetrieve<YAPIONAnyType>
-
internalContainsValue
public boolean internalContainsValue(@NonNull @NonNull YAPIONAnyType yapionAnyType)
- Specified by:
internalContainsValue
in interfaceInternalRetrieve<YAPIONAnyType>
-
internalGetYAPIONAnyType
public YAPIONAnyType internalGetYAPIONAnyType(@NonNull @NonNull YAPIONAnyType key)
- Specified by:
internalGetYAPIONAnyType
in interfaceInternalRetrieve<YAPIONAnyType>
-
internalAdd
public YAPIONMap internalAdd(@NonNull @NonNull YAPIONAnyType key, @NonNull @NonNull YAPIONAnyType value)
- Specified by:
internalAdd
in interfaceInternalAdd<YAPIONMap,YAPIONAnyType>
-
internalAddAndGetPrevious
public YAPIONAnyType internalAddAndGetPrevious(@NonNull @NonNull YAPIONAnyType key, @NonNull @NonNull YAPIONAnyType value)
- Specified by:
internalAddAndGetPrevious
in interfaceInternalAdd<YAPIONMap,YAPIONAnyType>
-
addOrPointer
public <C> YAPIONMap addOrPointer(@NonNull C key, @NonNull @NonNull YAPIONAnyType value)
Description copied from interface:MapAdd
Optional API.- Specified by:
addOrPointer
in interfaceMapAdd<YAPIONMap,YAPIONAnyType>
-
addOrPointerAndGetPrevious
public <C> YAPIONAnyType addOrPointerAndGetPrevious(@NonNull C key, @NonNull @NonNull YAPIONAnyType value)
Description copied from interface:MapAdd
Optional API.- Specified by:
addOrPointerAndGetPrevious
in interfaceMapAdd<YAPIONMap,YAPIONAnyType>
-
internalRemove
public YAPIONMap internalRemove(@NonNull @NonNull YAPIONAnyType key)
- Specified by:
internalRemove
in interfaceInternalRemove<YAPIONMap,YAPIONAnyType>
-
internalRemoveAndGet
public YAPIONAnyType internalRemoveAndGet(@NonNull @NonNull YAPIONAnyType key)
- Specified by:
internalRemoveAndGet
in interfaceInternalRemove<YAPIONMap,YAPIONAnyType>
-
itself
public YAPIONMap itself()
- Specified by:
itself
in interfaceInternalAdvancedOperations<YAPIONMap,YAPIONAnyType>
-
iterator
public java.util.Iterator<YAPIONAnyType> iterator()
- Specified by:
iterator
in interfaceInternalAdvancedOperations<YAPIONMap,YAPIONAnyType>
- Specified by:
iterator
in interfacejava.lang.Iterable<YAPIONAnyType>
-
allKeys
public java.util.Set<YAPIONAnyType> allKeys()
- Specified by:
allKeys
in interfaceInternalAdvancedOperations<YAPIONMap,YAPIONAnyType>
-
size
public int size()
- Specified by:
size
in classYAPIONDataType<YAPIONMap,YAPIONAnyType>
-
deepSize
public long deepSize()
- Specified by:
deepSize
in classYAPIONDataType<YAPIONMap,YAPIONAnyType>
-
length
public int length()
- Specified by:
length
in classYAPIONDataType<YAPIONMap,YAPIONAnyType>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in classYAPIONDataType<YAPIONMap,YAPIONAnyType>
-
getAllValues
public java.util.List<YAPIONAnyType> getAllValues()
- Specified by:
getAllValues
in classYAPIONDataType<YAPIONMap,YAPIONAnyType>
-
add
public void add(@NonNull @NonNull YAPIONParserMapValue variable)
-
finishMapping
public void finishMapping()
-
get
public YAPIONAnyType get(@NonNull @NonNull YAPIONAnyType key)
-
get
public java.util.Optional<ObjectSearch.YAPIONSearchResult<? extends YAPIONAnyType>> get(@NonNull @NonNull java.lang.String key)
- Specified by:
get
in interfaceObjectSearch
- Overrides:
get
in classYAPIONAnyType
-
getBackedMap
public java.util.Map<YAPIONAnyType,YAPIONAnyType> getBackedMap()
Modifying this is an unsafe operation. When you edit this you are on your own!- Returns:
- the internal backed map
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-