@Deprecated public class MemoryDataContainer extends MemoryDataView implements DataContainer
DataContainer
that can be instantiated
for any use. This is the primary implementation of any DataView
that
is used throughout both SpongeAPI and Sponge implementation.DataView.SafetyMode
map
Constructor and Description |
---|
MemoryDataContainer()
Deprecated.
|
MemoryDataContainer(DataView.SafetyMode safety)
|
Modifier and Type | Method and Description |
---|---|
DataContainer |
getContainer()
Deprecated.
Gets the parent container of this DataView.
|
Optional<DataView> |
getParent()
Deprecated.
Gets the parent
DataView of this view. |
DataContainer |
remove(DataQuery path)
Deprecated.
Removes the data associated to the given path relative to this
DataView 's path. |
DataContainer |
set(DataQuery path,
Object value)
Deprecated.
Sets the given Object value according to the given path relative to
this
DataView 's path. |
<E> DataContainer |
set(Key<? extends BaseValue<E>> key,
E value)
Deprecated.
|
contains, contains, copy, copy, createView, createView, equals, get, getBoolean, getBooleanList, getByte, getByteList, getCatalogType, getCatalogTypeList, getCharacterList, getCurrentPath, getDouble, getDoubleList, getFloat, getFloatList, getInt, getIntegerList, getKeys, getList, getLong, getLongList, getMap, getMapList, getName, getObject, getObjectList, getSafetyMode, getSerializable, getSerializableList, getShort, getShortList, getString, getStringList, getValues, getView, getViewList, hashCode, isEmpty, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
createNew, createNew
contains, contains, contains, contains, copy, copy, createView, createView, get, getBoolean, getBooleanList, getByte, getByteList, getCatalogType, getCatalogTypeList, getCharacterList, getCurrentPath, getDouble, getDoubleList, getFloat, getFloatList, getInt, getIntegerList, getKeys, getList, getLong, getLongList, getMap, getMapList, getName, getObject, getObjectList, getSafetyMode, getSerializable, getSerializableList, getShort, getShortList, getString, getStringList, getValues, getView, getViewList, isEmpty
@Deprecated public MemoryDataContainer()
DataContainer.createNew()
MemoryDataContainer
with a default
DataView.SafetyMode
of
DataView.SafetyMode.ALL_DATA_CLONED
.@Deprecated public MemoryDataContainer(DataView.SafetyMode safety)
MemoryDataContainer
with the provided
DataView.SafetyMode
.safety
- The safety mode to useDataView.SafetyMode
public Optional<DataView> getParent()
DataView
DataView
of this view. The parent directly
contains this view according to the DataView.getCurrentPath()
.
For any DataContainer
, this will return an absent parent.
getParent
in interface DataView
getParent
in class MemoryDataView
public final DataContainer getContainer()
DataView
Every DataView will always have a DataContainer
.
For any DataContainer
, this will return itself.
getContainer
in interface DataView
getContainer
in class MemoryDataView
public DataContainer set(DataQuery path, Object value)
DataView
DataView
's path.set
in interface DataContainer
set
in interface DataView
set
in class MemoryDataView
path
- The path of the object to setvalue
- The value of the datapublic <E> DataContainer set(Key<? extends BaseValue<E>> key, E value)
DataView
set
in interface DataContainer
set
in interface DataView
set
in class MemoryDataView
E
- The type of valuekey
- The key of the value to setvalue
- The value of the datapublic DataContainer remove(DataQuery path)
DataView
DataView
's path.
Path can not be empty, to remove this DataView
, call
the associated parent to remove this views name.
remove
in interface DataContainer
remove
in interface DataView
remove
in class MemoryDataView
path
- The path of data to remove