Package org.dellroad.stuff.vaadin24.data
Class MapPropertySet
java.lang.Object
org.dellroad.stuff.vaadin24.data.SimplePropertySet<Map<String,Object>>
org.dellroad.stuff.vaadin24.data.MapPropertySet
- All Implemented Interfaces:
PropertySet<Map<String,
,Object>> Serializable
Straightforward implementation of
PropertySet
with property values stored in a Map
.
This class is useful for building arbitrary property sets.
Does not support sub-properties.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.dellroad.stuff.vaadin24.data.SimplePropertySet
SimplePropertySet.Definition<V>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<V> SimplePropertySet<Map<String,
Object>>.Definition<V> addPropertyDefinition
(String name, Class<V> type) Add a new property to this instance, deriving the caption automatically from the property name.<V> SimplePropertySet<Map<String,
Object>>.Definition<V> addPropertyDefinition
(String name, Class<V> type, String caption) Add a new property to this instance.Methods inherited from class org.dellroad.stuff.vaadin24.data.SimplePropertySet
addPropertyDefinition, addPropertyDefinition, createDefinition, getProperties, getProperty, getTargetType, propertyDefinitionForBinding
-
Constructor Details
-
MapPropertySet
public MapPropertySet()
-
-
Method Details
-
addPropertyDefinition
public <V> SimplePropertySet<Map<String,Object>>.Definition<V> addPropertyDefinition(String name, Class<V> type, String caption) Add a new property to this instance.- Parameters:
name
- property nametype
- property typecaption
- property caption- Returns:
- newly created property definition
- Throws:
IllegalArgumentException
- if any parameter is nullIllegalArgumentException
- ifname
has already been added
-
addPropertyDefinition
public <V> SimplePropertySet<Map<String,Object>>.Definition<V> addPropertyDefinition(String name, Class<V> type) Add a new property to this instance, deriving the caption automatically from the property name.Equivalent to:
addPropertyDefinition
(name, type,
SharedUtil.camelCaseToHumanFriendly
(name))
.- Parameters:
name
- property nametype
- property type- Returns:
- newly created property definition
- Throws:
IllegalArgumentException
- if either parameter is nullIllegalArgumentException
- ifname
has already been added
-