public class ScopedDataSet extends DataSet
| Modifier and Type | Field and Description |
|---|---|
protected DataHolder |
parent |
NULL| Constructor and Description |
|---|
ScopedDataSet(@Nullable DataHolder parent) |
ScopedDataSet(@Nullable DataHolder parent,
@Nullable DataHolder 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() |
@NotNull MutableDataSet |
toMutable() |
aggregate, aggregate, aggregateActions, equals, hashCode, merge, registerDataKeyAggregator, toDataSet, toImmutable, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitget, setInprotected final DataHolder parent
public ScopedDataSet(@Nullable
@Nullable DataHolder parent)
public ScopedDataSet(@Nullable
@Nullable DataHolder parent,
@Nullable
@Nullable DataHolder 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 DataSet@NotNull public @NotNull MutableDataSet toMutable()
toMutable in interface DataHoldertoMutable 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 class DataSetkey - data keyfactory - factory taking this data holder and computing/providing default valueCopyright © 2020. All rights reserved.