V
- The type of the items in the collection.public class SingleItemCollection<V> extends ItemCollection<V>
LayoutData
, especially if the collection contains only one item.
Only one of the provided ways to define a collection can be used at the same time, therefore only one of the properties
Item
, Items
, Mapper
, and Delegate
should be set on each instance.
This class supports LayoutData
implementations and does not usually have to be used explicitly.
Constructor and Description |
---|
SingleItemCollection() |
Modifier and Type | Method and Description |
---|---|
V |
getItem()
Gets the single item this item collection contains.
|
IMapper<V,Boolean> |
provideMapper(LayoutGraphAdapter adapter,
ILayoutAlgorithm layout)
Provides a mapper describing which elements are contained in this
ItemCollection . |
void |
setItem(V value)
Sets the single item this item collection contains.
|
getDelegate, getItems, getMapper, setDelegate, setItems, setMapper, setSource
public final V getItem()
setItem(java.lang.Object)
public IMapper<V,Boolean> provideMapper(LayoutGraphAdapter adapter, ILayoutAlgorithm layout)
ItemCollection
.provideMapper
in class ItemCollection<V>
adapter
- The graph adapter the mapper shall be provided for.layout
- The layout using the item collection.