public class DataSet extends Object implements DataHolder
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<DataKeyBase<?>,Object> |
dataSet |
NULL| Constructor and Description |
|---|
DataSet() |
DataSet(@Nullable DataHolder other) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull DataHolder |
aggregate()
Apply aggregate action to data and return result
|
static @NotNull DataHolder |
aggregate(@Nullable DataHolder other,
@Nullable DataHolder overrides)
Aggregate two sets of options by aggregating their aggregate action keys then applying those actions on the resulting collection
|
static @NotNull DataHolder |
aggregateActions(@NotNull DataHolder other,
@NotNull DataHolder overrides)
aggregate actions of two data sets, actions not applied
|
boolean |
contains(@NotNull DataKeyBase<?> key) |
boolean |
equals(Object o) |
@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
|
int |
hashCode() |
static @NotNull DataSet |
merge(DataHolder... dataHolders) |
static void |
registerDataKeyAggregator(@NotNull DataKeyAggregator keyAggregator) |
@NotNull DataSet |
toDataSet() |
@NotNull DataSet |
toImmutable() |
@NotNull MutableDataSet |
toMutable() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitget, setInprotected final HashMap<DataKeyBase<?>,Object> dataSet
public DataSet()
public DataSet(@Nullable
@Nullable DataHolder other)
@NotNull public static @NotNull DataHolder aggregateActions(@NotNull @NotNull DataHolder other, @NotNull @NotNull DataHolder overrides)
other - first set of optionsoverrides - overrides on options@NotNull public @NotNull DataHolder aggregate()
@NotNull public static @NotNull DataHolder aggregate(@Nullable @Nullable DataHolder other, @Nullable @Nullable DataHolder overrides)
other - options with aggregate actions already applied, no aggregate action keys are expected or checkedoverrides - overrides which may contain aggregate actions@NotNull public @NotNull Map<? extends DataKeyBase<?>,Object> getAll()
getAll in interface DataHolder@NotNull public @NotNull Collection<? extends DataKeyBase<?>> getKeys()
getKeys in interface DataHolderpublic boolean contains(@NotNull
@NotNull DataKeyBase<?> key)
contains in interface DataHolder@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 DataHolderkey - data keyfactory - factory taking this data holder and computing/providing default value@NotNull public static @NotNull DataSet merge(@NotNull DataHolder... dataHolders)
@NotNull public @NotNull MutableDataSet toMutable()
toMutable in interface DataHolder@NotNull public @NotNull DataSet toImmutable()
toImmutable in interface DataHolder@NotNull public @NotNull DataSet toDataSet()
toDataSet in interface DataHolderpublic static void registerDataKeyAggregator(@NotNull
@NotNull DataKeyAggregator keyAggregator)
Copyright © 2020. All rights reserved.