Package yapion.hierarchy.types
Class YAPIONObject
- java.lang.Object
-
- yapion.hierarchy.api.groups.YAPIONAnyType
-
- yapion.hierarchy.api.groups.YAPIONDataType
-
- yapion.hierarchy.api.groups.YAPIONMappingType
-
- yapion.hierarchy.types.YAPIONObject
-
- All Implemented Interfaces:
java.lang.Iterable<YAPIONAnyType>,ObjectOutput,ObjectPath,ObjectSearch,ObjectType,ObjectAdd<YAPIONObject,java.lang.String>,ObjectAdvancedOperations<YAPIONObject,java.lang.String>,ObjectRemove<YAPIONObject,java.lang.String>,ObjectRetrieve<java.lang.String>
public class YAPIONObject extends YAPIONMappingType implements ObjectRetrieve<java.lang.String>, ObjectAdd<YAPIONObject,java.lang.String>, ObjectRemove<YAPIONObject,java.lang.String>, ObjectAdvancedOperations<YAPIONObject,java.lang.String>
-
-
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 YAPIONObject()
-
Method Summary
Modifier and Type Method Description YAPIONObjectadd(@NonNull java.lang.String key, @NonNull YAPIONAnyType value)YAPIONObjectaddOrPointer(@NonNull java.lang.String key, @NonNull YAPIONAnyType value)Optional API.java.util.Set<java.lang.String>allKeys()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.util.List<java.lang.String>getKeys()java.lang.StringgetPath(YAPIONAnyType yapionAnyType)YAPIONTypegetType()YAPIONAnyTypegetYAPIONAnyType(@NonNull java.lang.String key)inthashCode()<T> booleanhasValue(@NonNull java.lang.String key, java.lang.Class<T> type)booleanhasValue(@NonNull java.lang.String key, YAPIONType yapionType)booleanisEmpty()java.util.Iterator<YAPIONAnyType>iterator()YAPIONObjectitself()intlength()protected longreferenceValueProvider(ReferenceFunction referenceFunction)YAPIONObjectremove(@NonNull java.lang.String key)YAPIONAnyTyperemoveAndGet(@NonNull java.lang.String key)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.ObjectAdd
add, add, add, add, add, add, add, add, add, add, add
-
Methods inherited from interface yapion.hierarchy.api.storage.ObjectAdvancedOperations
addIfAbsent, addIfAbsent, addIfAbsent, compute, computeIfAbsent, 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
-
getKeys
public java.util.List<java.lang.String> getKeys()
-
hasValue
public boolean hasValue(@NonNull @NonNull java.lang.String key, YAPIONType yapionType)- Specified by:
hasValuein interfaceObjectRetrieve<java.lang.String>
-
hasValue
public <T> boolean hasValue(@NonNull @NonNull java.lang.String key, java.lang.Class<T> type)- Specified by:
hasValuein interfaceObjectRetrieve<java.lang.String>
-
getYAPIONAnyType
public YAPIONAnyType getYAPIONAnyType(@NonNull @NonNull java.lang.String key)
- Specified by:
getYAPIONAnyTypein interfaceObjectRetrieve<java.lang.String>
-
add
public YAPIONObject add(@NonNull @NonNull java.lang.String key, @NonNull @NonNull YAPIONAnyType value)
- Specified by:
addin interfaceObjectAdd<YAPIONObject,java.lang.String>
-
addOrPointer
public YAPIONObject addOrPointer(@NonNull @NonNull java.lang.String key, @NonNull @NonNull YAPIONAnyType value)
Description copied from interface:ObjectAddOptional API.- Specified by:
addOrPointerin interfaceObjectAdd<YAPIONObject,java.lang.String>
-
remove
public YAPIONObject remove(@NonNull @NonNull java.lang.String key)
- Specified by:
removein interfaceObjectRemove<YAPIONObject,java.lang.String>
-
removeAndGet
public YAPIONAnyType removeAndGet(@NonNull @NonNull java.lang.String key)
- Specified by:
removeAndGetin interfaceObjectRemove<YAPIONObject,java.lang.String>
-
itself
public YAPIONObject itself()
- Specified by:
itselfin interfaceObjectAdvancedOperations<YAPIONObject,java.lang.String>
-
iterator
public java.util.Iterator<YAPIONAnyType> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<YAPIONAnyType>- Specified by:
iteratorin interfaceObjectAdvancedOperations<YAPIONObject,java.lang.String>
-
allKeys
public java.util.Set<java.lang.String> allKeys()
- Specified by:
allKeysin interfaceObjectAdvancedOperations<YAPIONObject,java.lang.String>
-
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
-
-