Class ScopedDataSet
java.lang.Object
com.vladsch.flexmark.util.data.DataSet
com.vladsch.flexmark.util.data.ScopedDataSet
- All Implemented Interfaces:
DataHolder, MutableDataSetter
-
Field Summary
FieldsFields inherited from interface DataHolder
NULL -
Constructor Summary
ConstructorsConstructorDescriptionScopedDataSet(@Nullable DataHolder parent) ScopedDataSet(@Nullable DataHolder parent, @Nullable DataHolder other) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(@NotNull DataKeyBase<?> key) @NotNull Map<? extends DataKeyBase<?>, Object> getAll()@NotNull Collection<? extends DataKeyBase<?>> getKeys()@Nullable ObjectgetOrCompute(@NotNull DataKeyBase<?> key, @NotNull DataValueFactory<?> factory) Get key if it exists or compute using supplier@NotNull MutableDataSetMethods inherited from class DataSet
aggregate, aggregate, aggregateActions, equals, hashCode, invokeSetContains, isAggregatorRegistered, merge, registerDataKeyAggregator, toDataSet, toImmutable, toStringMethods inherited from interface DataHolder
get, setIn
-
Field Details
-
parent
-
-
Constructor Details
-
ScopedDataSet
-
ScopedDataSet
-
-
Method Details
-
getParent
-
getAll
- Specified by:
getAllin interfaceDataHolder- Overrides:
getAllin classDataSet
-
getKeys
- Specified by:
getKeysin interfaceDataHolder- Overrides:
getKeysin classDataSet
-
toMutable
- Specified by:
toMutablein interfaceDataHolder- Overrides:
toMutablein classDataSet
-
contains
- Specified by:
containsin interfaceDataHolder- Overrides:
containsin classDataSet
-
getOrCompute
@Nullable public @Nullable Object getOrCompute(@NotNull @NotNull DataKeyBase<?> key, @NotNull @NotNull DataValueFactory<?> factory) Description copied from interface:DataHolderGet key if it exists or compute using supplierMethod 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.
- Specified by:
getOrComputein interfaceDataHolder- Overrides:
getOrComputein classDataSet- Parameters:
key- data keyfactory- factory taking this data holder and computing/providing default value- Returns:
- object value for the key
-