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 YAPIONArrayadd(@NonNull java.lang.Integer key, @NonNull YAPIONAnyType value)YAPIONArrayadd(@NonNull YAPIONAnyType value)<T> YAPIONArrayaddIfAbsent(@NonNull java.lang.Integer key, @NonNull java.lang.Class<T> type, @NonNull YAPIONAnyType value)YAPIONArrayaddIfAbsent(@NonNull java.lang.Integer key, @NonNull YAPIONAnyType value)YAPIONArrayaddIfAbsent(@NonNull java.lang.Integer key, @NonNull YAPIONType yapionType, @NonNull YAPIONAnyType value)YAPIONArrayaddOrPointer(@NonNull java.lang.Integer key, @NonNull YAPIONAnyType value)Optional API.YAPIONArrayaddOrPointer(@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)longdeepSize()booleanequals(java.lang.Object o)java.util.Optional<ObjectSearch.YAPIONSearchResult<? extends YAPIONAnyType>>get(@NonNull java.lang.String key)java.util.List<YAPIONAnyType>getAllValues()java.lang.StringgetPath(YAPIONAnyType yapionAnyType)YAPIONTypegetType()YAPIONAnyTypegetYAPIONAnyType(@NonNull java.lang.Integer key)inthashCode()<T> booleanhasValue(@NonNull java.lang.Integer key, java.lang.Class<T> type)booleanhasValue(@NonNull java.lang.Integer key, YAPIONType yapionType)booleanisEmpty()java.util.Iterator<YAPIONAnyType>iterator()YAPIONArrayitself()intlength()protected longreferenceValueProvider(ReferenceFunction referenceFunction)YAPIONArrayremove(@NonNull java.lang.Integer key)YAPIONAnyTyperemoveAndGet(@NonNull java.lang.Integer key)YAPIONArrayset(@NonNull java.lang.Integer key, @NonNull YAPIONAnyType value)YAPIONArraysetOrPointer(@NonNull java.lang.Integer key, @NonNull YAPIONAnyType value)Optional API.intsize()<T extends AbstractOutput>
TtoJSON(T abstractOutput)<T extends AbstractOutput>
TtoJSONLossy(T abstractOutput)java.lang.StringtoString()<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:
getTypein interfaceObjectType
-
referenceValueProvider
protected long referenceValueProvider(ReferenceFunction referenceFunction)
- Overrides:
referenceValueProviderin classYAPIONAnyType
-
toYAPION
public <T extends AbstractOutput> T toYAPION(T abstractOutput)
- Specified by:
toYAPIONin interfaceObjectOutput
-
toJSON
public <T extends AbstractOutput> T toJSON(T abstractOutput)
- Specified by:
toJSONin interfaceObjectOutput
-
toJSONLossy
public <T extends AbstractOutput> T toJSONLossy(T abstractOutput)
- Specified by:
toJSONLossyin interfaceObjectOutput
-
getPath
public java.lang.String getPath(YAPIONAnyType yapionAnyType)
- Specified by:
getPathin interfaceObjectPath- Overrides:
getPathin classYAPIONAnyType
-
hasValue
public boolean hasValue(@NonNull @NonNull java.lang.Integer key, YAPIONType yapionType)- Specified by:
hasValuein interfaceObjectRetrieve<java.lang.Integer>
-
hasValue
public <T> boolean hasValue(@NonNull @NonNull java.lang.Integer key, java.lang.Class<T> type)- Specified by:
hasValuein interfaceObjectRetrieve<java.lang.Integer>
-
getYAPIONAnyType
public YAPIONAnyType getYAPIONAnyType(@NonNull @NonNull java.lang.Integer key)
- Specified by:
getYAPIONAnyTypein interfaceObjectRetrieve<java.lang.Integer>
-
add
public YAPIONArray add(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull YAPIONAnyType value)
- Specified by:
addin interfaceObjectAdd<YAPIONArray,java.lang.Integer>
-
set
public YAPIONArray set(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull YAPIONAnyType value)
- Specified by:
setin interfaceArrayAdd<YAPIONArray,java.lang.Integer>
-
add
public YAPIONArray add(@NonNull @NonNull YAPIONAnyType value)
- Specified by:
addin interfaceArrayAdd<YAPIONArray,java.lang.Integer>
-
addOrPointer
public YAPIONArray addOrPointer(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull YAPIONAnyType value)
Description copied from interface:ObjectAddOptional API.- Specified by:
addOrPointerin interfaceObjectAdd<YAPIONArray,java.lang.Integer>
-
addOrPointer
public YAPIONArray addOrPointer(@NonNull @NonNull YAPIONAnyType value)
Description copied from interface:ArrayAddOptional API.- Specified by:
addOrPointerin interfaceArrayAdd<YAPIONArray,java.lang.Integer>
-
setOrPointer
public YAPIONArray setOrPointer(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull YAPIONAnyType value)
Description copied from interface:ArrayAddOptional API.- Specified by:
setOrPointerin interfaceArrayAdd<YAPIONArray,java.lang.Integer>
-
remove
public YAPIONArray remove(@NonNull @NonNull java.lang.Integer key)
- Specified by:
removein interfaceObjectRemove<YAPIONArray,java.lang.Integer>
-
removeAndGet
public YAPIONAnyType removeAndGet(@NonNull @NonNull java.lang.Integer key)
- Specified by:
removeAndGetin interfaceObjectRemove<YAPIONArray,java.lang.Integer>
-
itself
public YAPIONArray itself()
- Specified by:
itselfin interfaceObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
iterator
public java.util.Iterator<YAPIONAnyType> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<YAPIONAnyType>- Specified by:
iteratorin interfaceObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
allKeys
public java.util.Set<java.lang.Integer> allKeys()
- Specified by:
allKeysin interfaceObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
addIfAbsent
public YAPIONArray addIfAbsent(@NonNull @NonNull java.lang.Integer key, @NonNull @NonNull YAPIONAnyType value)
- Specified by:
addIfAbsentin 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:
addIfAbsentin 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:
addIfAbsentin 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:
computeIfAbsentin 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:
computein interfaceObjectAdvancedOperations<YAPIONArray,java.lang.Integer>
-
size
public int size()
- Specified by:
sizein classYAPIONDataType
-
deepSize
public long deepSize()
- Specified by:
deepSizein classYAPIONDataType
-
length
public int length()
- Specified by:
lengthin classYAPIONDataType
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin classYAPIONDataType
-
getAllValues
public java.util.List<YAPIONAnyType> getAllValues()
- Specified by:
getAllValuesin classYAPIONDataType
-
get
public java.util.Optional<ObjectSearch.YAPIONSearchResult<? extends YAPIONAnyType>> get(@NonNull @NonNull java.lang.String key)
- Specified by:
getin interfaceObjectSearch- Overrides:
getin classYAPIONAnyType
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-