Top Fields Methods
com.vladsch.flexmark.util.data

public Interface MutableDataHolder

extends DataHolder, MutableDataSetter
Known Direct Implementers
com.vladsch.flexmark.util.data.MutableDataSet
Imports
org.jetbrains.annotations.NotNull, .Nullable

Field Summary

Inherited from com.vladsch.flexmark.util.data.DataHolder:
NULL

Method Summary

Modifier and TypeMethod and Description
public @NotNull MutableDataHolder

Returns:

mutable data holder for chained calls
clear
()

clear all options out of the data set

public default <T> T

Returns:

return stored value or newly created value
get
(@NotNull DataKey<T>
data key
key
)
Deprecated use key.get(dataHolder) instead, which will do the same thing an carries nullable information for the data

Get the given key, if it does not exist then use the key's factory to create a new value and put it into the collection so that the following get of the same key will find a value

public Object
public @NotNull MutableDataHolder

Returns:

mutable data holder for chained calls
remove
(@NotNull DataKeyBase<?>
data key to remove
key
)

Remove the stored value for the key, used to force to default or to force recompute

public <
data type of the data referred by the key
T
>
@NotNull MutableDataHolder

Returns:

mutable data holder for chained calls
set
(@NotNull DataKey<T>
data key
key
,
T
value to store
value
)

Store the given value for the key

public <
data type of the data referred by the key
T
>
@NotNull MutableDataHolder

Returns:

mutable data holder for chained calls
set
(@NotNull NullableDataKey<T>
data key
key
,
T
value to store
value
)

Store the given value for the key

public @NotNull MutableDataHolder

Returns:

mutable data holder for chained calls
setAll
(@NotNull DataHolder
data holder from which to copy all values
other
)

Copy all values from one data holder to this data holder

public @NotNull MutableDataHolder

Returns:

mutable data holder for chained calls
setFrom
(@NotNull MutableDataSetter
data setter which will set values
dataSetter
)

Store the given value for the key

public @NotNull MutableDataHolder

Returns:

dataHolder
setIn
(@NotNull MutableDataHolder
data holder where to copy options from this data holder
dataHolder
)

Set options in given mutable data holder

Inherited from com.vladsch.flexmark.util.data.DataHolder:
containsgetgetAllgetKeysgetOrComputesetIntoDataSettoImmutabletoMutable
Inherited from com.vladsch.flexmark.util.data.MutableDataSetter:
setIn

Method Detail

clearback to summary
public @NotNull MutableDataHolder clear()

clear all options out of the data set

Returns:@NotNull MutableDataHolder

mutable data holder for chained calls

Annotations
@NotNull
getback to summary
public default <T> T get(@NotNull DataKey<T> key)

Deprecated

use key.get(dataHolder) instead, which will do the same thing an carries nullable information for the data

Get the given key, if it does not exist then use the key's factory to create a new value and put it into the collection so that the following get of the same key will find a value

Parameters
key:@NotNull DataKey<T>

data key

Returns:T

return stored value or newly created value

Annotations
@Deprecated
getOrComputeback to summary
public Object getOrCompute(@NotNull DataKeyBase<?> key, @NotNull DataValueFactory<?> factory)
Annotations
@Override
removeback to summary
public @NotNull MutableDataHolder remove(@NotNull DataKeyBase<?> key)

Remove the stored value for the key, used to force to default or to force recompute

Parameters
key:@NotNull DataKeyBase<?>

data key to remove

Returns:@NotNull MutableDataHolder

mutable data holder for chained calls

Annotations
@NotNull
setback to summary
public <T> @NotNull MutableDataHolder set(@NotNull DataKey<T> key, T value)

Store the given value for the key

Parameters
<T>
data type of the data referred by the key
key:@NotNull DataKey<T>

data key

value:T

value to store

Returns:@NotNull MutableDataHolder

mutable data holder for chained calls

Annotations
@NotNull
setback to summary
public <T> @NotNull MutableDataHolder set(@NotNull NullableDataKey<T> key, T value)

Store the given value for the key

Parameters
<T>
data type of the data referred by the key
key:@NotNull NullableDataKey<T>

data key

value:T

value to store

Returns:@NotNull MutableDataHolder

mutable data holder for chained calls

Annotations
@NotNull
setAllback to summary
public @NotNull MutableDataHolder setAll(@NotNull DataHolder other)

Copy all values from one data holder to this data holder

Parameters
other:@NotNull DataHolder

data holder from which to copy all values

Returns:@NotNull MutableDataHolder

mutable data holder for chained calls

Annotations
@NotNull
setFromback to summary
public @NotNull MutableDataHolder setFrom(@NotNull MutableDataSetter dataSetter)

Store the given value for the key

Parameters
dataSetter:@NotNull MutableDataSetter

data setter which will set values

Returns:@NotNull MutableDataHolder

mutable data holder for chained calls

Annotations
@NotNull
setInback to summary
public @NotNull MutableDataHolder setIn(@NotNull MutableDataHolder dataHolder)

Set options in given mutable data holder

Parameters
dataHolder:@NotNull MutableDataHolder

data holder where to copy options from this data holder

Returns:@NotNull MutableDataHolder

dataHolder

Annotations
@NotNull
@Override