V
- The type of propertyprotected static class MapMetaData.Property<V> extends AbstractPropertyMetaData<Map<String,Object>,V>
PropertyMetaData
implementation for map.constraint, converter, defaultValue, name
Modifier | Constructor and Description |
---|---|
protected |
Property(String name,
Converter<V> converter,
Constraint<? super V> constraint,
V defaultValue)
Constructs a new
MapMetaData.Property with the
specified name, converter, constraint and default value. |
Modifier and Type | Method and Description |
---|---|
V |
getValue(Map<String,Object> map)
Returns value of this property for the specified map.
|
void |
setValue(Map<String,Object> map,
Object value)
Assigns value of this property for the specified map.
|
cast, equals, getConstraint, getConverter, getDefaultValue, getName, getType, hashCode, isReadable, isRequired, isWriteable, toString
protected Property(String name, Converter<V> converter, Constraint<? super V> constraint, V defaultValue)
MapMetaData.Property
with the
specified name, converter, constraint and default value.name
- Property name.converter
- Converter to be used for property value conversion
into and from string representation.constraint
- Constraint to be used for property value validation.defaultValue
- Property default value.IllegalArgumentException
- if the specified name or converter
is null
or name is empty.public V getValue(Map<String,Object> map)
getValue
in interface PropertyMetaData<Map<String,Object>,V>
getValue
in class AbstractPropertyMetaData<Map<String,Object>,V>
map
- Map whose property value should be returned.IllegalArgumentException
- if the specified map is
null
.public void setValue(Map<String,Object> map, Object value)
setValue
in interface PropertyMetaData<Map<String,Object>,V>
setValue
in class AbstractPropertyMetaData<Map<String,Object>,V>
map
- Map whose property value should be assigned.value
- New property value.IllegalArgumentException
- if the specified map is
null
.Copyright © 2011–2020 FoxLabs. All rights reserved.