public class MutableScopedDataSet extends MutableDataSet
| Modifier and Type | Field and Description |
|---|---|
protected DataHolder |
parent |
NULL| Constructor and Description |
|---|
MutableScopedDataSet(DataHolder parent) |
MutableScopedDataSet(DataHolder parent,
MutableDataHolder other) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(@NotNull DataKeyBase<?> key) |
@NotNull Map<? extends DataKeyBase<?>,Object> |
getAll() |
@NotNull Collection<? extends DataKeyBase<?>> |
getKeys() |
@Nullable Object |
getOrCompute(@NotNull DataKeyBase<?> key,
@NotNull DataValueFactory<?> factory)
Get key if it exists or compute using supplier
|
DataHolder |
getParent() |
clear, merge, remove, set, set, setAll, setFrom, setIn, toDataSet, toImmutable, toMutableaggregate, aggregate, aggregateActions, equals, hashCode, registerDataKeyAggregator, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetprotected final DataHolder parent
public MutableScopedDataSet(DataHolder parent)
public MutableScopedDataSet(DataHolder parent, MutableDataHolder other)
public DataHolder getParent()
@NotNull public @NotNull Map<? extends DataKeyBase<?>,Object> getAll()
getAll in interface DataHoldergetAll in class DataSet@NotNull public @NotNull Collection<? extends DataKeyBase<?>> getKeys()
getKeys in interface DataHoldergetKeys in class DataSetpublic boolean contains(@NotNull
@NotNull DataKeyBase<?> key)
contains in interface DataHoldercontains in class DataSet@Nullable public @Nullable Object getOrCompute(@NotNull @NotNull DataKeyBase<?> key, @NotNull @NotNull DataValueFactory<?> factory)
DataHolderMethod used by DataKey classes to access data.
NOTE: MutableDataHolders will compute an absent key and add it to its dataSet. DataHolders will return computed value but not change contained dataSet because they are immutable. So value will be computed every time it is requested.
getOrCompute in interface DataHoldergetOrCompute in interface MutableDataHoldergetOrCompute in class MutableDataSetkey - data keyfactory - factory taking this data holder and computing/providing default valueCopyright © 2020. All rights reserved.