D
- the kind of item this converter is used forpublic class StrategyPlaceholderListItemConverter<D extends PlaceholderListItem<Dockable>> extends PlaceholderListItemAdapter<Dockable,D>
PlaceholderStrategy
to create new placeholders, but
does not convert placeholders back to dockables.Constructor and Description |
---|
StrategyPlaceholderListItemConverter(PlaceholderStrategy strategy)
Creates a new converter
|
Modifier and Type | Method and Description |
---|---|
ConvertedPlaceholderListItem |
convert(int index,
D dockable)
Given some non-
null dockable, this method converts the element into
some data that can be stored persistently. |
PlaceholderStrategy |
getStrategy()
Gets the strategy that is used for creating placeholders.
|
added, convert
public StrategyPlaceholderListItemConverter(PlaceholderStrategy strategy)
strategy
- the strategy to create placeholders, can be null
public PlaceholderStrategy getStrategy()
null
public ConvertedPlaceholderListItem convert(int index, D dockable)
PlaceholderListItemConverter
null
dockable, this method converts the element into
some data that can be stored persistently.convert
in interface PlaceholderListItemConverter<Dockable,D extends PlaceholderListItem<Dockable>>
convert
in class PlaceholderListItemAdapter<Dockable,D extends PlaceholderListItem<Dockable>>
index
- the index of dockable
in the dockables-list
dockable
- the element to storenull
to indicate that this element
should not be stored