Package yapion.hierarchy.types
Class YAPIONArray
- java.lang.Object
-
- yapion.hierarchy.api.groups.YAPIONAnyType
-
- yapion.hierarchy.api.groups.YAPIONDataType
-
- yapion.hierarchy.types.YAPIONArray
-
- All Implemented Interfaces:
java.lang.Iterable<YAPIONAnyType>
,ObjectOutput
,ObjectPath
,ObjectSearch
,ObjectType
,ArrayAdd<YAPIONArray,java.lang.Integer>
,ObjectAdd<YAPIONArray,java.lang.Integer>
,ObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
,ObjectRemove<YAPIONArray,java.lang.Integer>
,ObjectRetrieve<java.lang.Integer>
public class YAPIONArray extends YAPIONDataType implements ObjectRetrieve<java.lang.Integer>, ArrayAdd<YAPIONArray,java.lang.Integer>, ObjectRemove<YAPIONArray,java.lang.Integer>, ObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface yapion.hierarchy.api.ObjectSearch
ObjectSearch.YAPIONSearchResult<T extends YAPIONAnyType>
-
-
Field Summary
-
Fields inherited from interface yapion.hierarchy.api.ObjectOutput
indentString
-
-
Constructor Summary
Constructors Constructor Description YAPIONArray()
-
Method Summary
Modifier and Type Method Description YAPIONArray
add(@NonNull java.lang.Integer key, @NonNull YAPIONAnyType value)
YAPIONArray
add(@NonNull YAPIONAnyType value)
<T> YAPIONArray
addIfAbsent(@NonNull java.lang.Integer key, @NonNull java.lang.Class<T> type, @NonNull YAPIONAnyType value)
YAPIONArray
addIfAbsent(@NonNull java.lang.Integer key, @NonNull YAPIONAnyType value)
YAPIONArray
addIfAbsent(@NonNull java.lang.Integer key, @NonNull YAPIONType yapionType, @NonNull YAPIONAnyType value)
YAPIONArray
addOrPointer(@NonNull java.lang.Integer key, @NonNull YAPIONAnyType value)
Optional API.YAPIONArray
addOrPointer(@NonNull YAPIONAnyType value)
Optional API.java.util.Set<java.lang.Integer>
allKeys()
<T extends YAPIONAnyType>
YAPIONArraycompute(@NonNull java.lang.Integer key, @NonNull java.util.function.BiFunction<java.lang.Integer,T,T> remappingFunction)
<T extends YAPIONAnyType>
YAPIONArraycomputeIfAbsent(@NonNull java.lang.Integer key, @NonNull java.util.function.Function<java.lang.Integer,T> mappingFunction)
long
deepSize()
boolean
equals(java.lang.Object o)
java.util.Optional<ObjectSearch.YAPIONSearchResult<? extends YAPIONAnyType>>
get(@NonNull java.lang.String key)
java.util.List<YAPIONAnyType>
getAllValues()
java.lang.String
getPath(YAPIONAnyType yapionAnyType)
YAPIONType
getType()
YAPIONAnyType
getYAPIONAnyType(@NonNull java.lang.Integer key)
int
hashCode()
<T> boolean
hasValue(@NonNull java.lang.Integer key, java.lang.Class<T> type)
boolean
hasValue(@NonNull java.lang.Integer key, YAPIONType yapionType)
boolean
isEmpty()
java.util.Iterator<YAPIONAnyType>
iterator()
YAPIONArray
itself()
int
length()
protected long
referenceValueProvider(ReferenceFunction referenceFunction)
YAPIONArray
remove(@NonNull java.lang.Integer key)
YAPIONAnyType
removeAndGet(@NonNull java.lang.Integer key)
YAPIONArray
set(@NonNull java.lang.Integer key, @NonNull YAPIONAnyType value)
YAPIONArray
setOrPointer(@NonNull java.lang.Integer key, @NonNull YAPIONAnyType value)
Optional API.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, getParseTime, getParseTimeMillis, getParseTimeMillisAsLong, getPath, getReferenceValue, hasParent, hasReferenceValue, indent, isValuePresent, reducedIndent, 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.ArrayAdd
add, add, add, add, add, add, add, add, add, add, add, set, set, set, set, set, set, set, set, set, set, set
-
Methods inherited from interface yapion.hierarchy.api.storage.ObjectAdd
add, add, add, add, add, add, add, add, add, add, add
-
Methods inherited from interface yapion.hierarchy.api.storage.ObjectAdvancedOperations
computeIfPresent, forEach, merge, parallelStream, removeAll, removeIf, removeIf, replace, replaceAll, retainAll, retainIf, retainIf, spliterator, stream
-
Methods inherited from interface yapion.hierarchy.api.ObjectOutput
indent
-
Methods inherited from interface yapion.hierarchy.api.storage.ObjectRetrieve
getArray, getArray, getMap, getMap, getObject, getObject, getPlainValue, getPlainValue, getPlainValueOrDefault, getPointer, getPointer, getValue, getValue, getValue, getValue, getValue, getValue, getValueOrDefault, getValueOrDefault, 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
-
hasValue
public boolean hasValue(@NonNull @NonNull java.lang.Integer key, YAPIONType yapionType)
- Specified by:
hasValue
in interfaceObjectRetrieve<java.lang.Integer>
-
hasValue
public <T> boolean hasValue(@NonNull @NonNull java.lang.Integer key, java.lang.Class<T> type)
- Specified by:
hasValue
in interfaceObjectRetrieve<java.lang.Integer>
-
getYAPIONAnyType
public YAPIONAnyType getYAPIONAnyType(@NonNull @NonNull java.lang.Integer key)
- Specified by:
getYAPIONAnyType
in interfaceObjectRetrieve<java.lang.Integer>
-
add
public YAPIONArray add(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull YAPIONAnyType value)
- Specified by:
add
in interfaceObjectAdd<YAPIONArray,java.lang.Integer>
-
set
public YAPIONArray set(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull YAPIONAnyType value)
- Specified by:
set
in interfaceArrayAdd<YAPIONArray,java.lang.Integer>
-
add
public YAPIONArray add(@NonNull @NonNull YAPIONAnyType value)
- Specified by:
add
in interfaceArrayAdd<YAPIONArray,java.lang.Integer>
-
addOrPointer
public YAPIONArray addOrPointer(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull YAPIONAnyType value)
Description copied from interface:ObjectAdd
Optional API.- Specified by:
addOrPointer
in interfaceObjectAdd<YAPIONArray,java.lang.Integer>
-
addOrPointer
public YAPIONArray addOrPointer(@NonNull @NonNull YAPIONAnyType value)
Description copied from interface:ArrayAdd
Optional API.- Specified by:
addOrPointer
in interfaceArrayAdd<YAPIONArray,java.lang.Integer>
-
setOrPointer
public YAPIONArray setOrPointer(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull YAPIONAnyType value)
Description copied from interface:ArrayAdd
Optional API.- Specified by:
setOrPointer
in interfaceArrayAdd<YAPIONArray,java.lang.Integer>
-
remove
public YAPIONArray remove(@NonNull @NonNull java.lang.Integer key)
- Specified by:
remove
in interfaceObjectRemove<YAPIONArray,java.lang.Integer>
-
removeAndGet
public YAPIONAnyType removeAndGet(@NonNull @NonNull java.lang.Integer key)
- Specified by:
removeAndGet
in interfaceObjectRemove<YAPIONArray,java.lang.Integer>
-
itself
public YAPIONArray itself()
- Specified by:
itself
in interfaceObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
iterator
public java.util.Iterator<YAPIONAnyType> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<YAPIONAnyType>
- Specified by:
iterator
in interfaceObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
allKeys
public java.util.Set<java.lang.Integer> allKeys()
- Specified by:
allKeys
in interfaceObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
addIfAbsent
public YAPIONArray addIfAbsent(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull YAPIONAnyType value)
- Specified by:
addIfAbsent
in interfaceObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
addIfAbsent
public YAPIONArray addIfAbsent(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull YAPIONType yapionType, @NonNull @NonNull YAPIONAnyType value)
- Specified by:
addIfAbsent
in interfaceObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
addIfAbsent
public <T> YAPIONArray addIfAbsent(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull java.lang.Class<T> type, @NonNull @NonNull YAPIONAnyType value)
- Specified by:
addIfAbsent
in interfaceObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
computeIfAbsent
public <T extends YAPIONAnyType> YAPIONArray computeIfAbsent(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull java.util.function.Function<java.lang.Integer,T> mappingFunction)
- Specified by:
computeIfAbsent
in interfaceObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
compute
public <T extends YAPIONAnyType> YAPIONArray compute(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull java.util.function.BiFunction<java.lang.Integer,T,T> remappingFunction)
- Specified by:
compute
in interfaceObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
size
public int size()
- Specified by:
size
in classYAPIONDataType
-
deepSize
public long deepSize()
- Specified by:
deepSize
in classYAPIONDataType
-
length
public int length()
- Specified by:
length
in classYAPIONDataType
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in classYAPIONDataType
-
getAllValues
public java.util.List<YAPIONAnyType> getAllValues()
- Specified by:
getAllValues
in classYAPIONDataType
-
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
-
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
-
-