ValueType - value typepublic abstract class AbstractProperty<ValueType> extends Object implements Property<ValueType>
Property.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractProperty(Properties aType,
String aKey,
ValueType aValue)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
AbstractProperty<ValueType> |
clone()
Clone property.
|
boolean |
equals(Object obj) |
static <ValueType> |
get(Class<ValueType> type,
Collection<Property<?>> props,
String aKey)
Get property value from
Collection. |
static <ValueType> |
get(Class<ValueType> type,
Collection<Property<?>> props,
String aKey,
ValueType defValue)
Get property value from
Collection.Default value will be used if: - type is null;- props is null;- aKey is empty; - property not found; - property value is null;- property value type differs. |
static <ValueType> |
get(Class<ValueType> type,
Map<String,Property<?>> props,
String aKey)
Get property value from
Map.Property would be resolved by map key, property key would not be verified. |
static <ValueType> |
get(Class<ValueType> type,
Map<String,Property<?>> props,
String aKey,
ValueType defValue)
Get property value from
Map.Property would be resolved by map key, property key would not be verified. Default value will be used if: - type is null;- props is null;- aKey is empty; - property not found; - property value is null;- property value type differs. |
static <ValueType> |
get(Class<ValueType> type,
Property<?> prop)
Get property value from
Property. |
static <ValueType> |
get(Class<ValueType> type,
Property<?> prop,
ValueType defValue)
Get property value from
Property.Default value will be used if: - type is null;- prop is null;- property value is null;- property value type differs. |
String |
getGroup()
Get property group.
Optional field for any custom properties grouping. |
String |
getKey()
Get property key.
|
Properties |
getType()
Get property type.
|
ValueType |
getValue()
Get property value.
|
int |
hashCode() |
void |
setGroup(String group) |
void |
setKey(String aKey) |
void |
setValue(ValueType aValue) |
String |
toString() |
protected AbstractProperty(Properties aType, String aKey, ValueType aValue)
aType - property typeaKey - property keyaValue - property valuepublic Properties getType()
Propertypublic void setKey(String aKey)
public ValueType getValue()
Propertypublic void setValue(ValueType aValue)
public String getGroup()
Propertypublic void setGroup(String group)
public static <ValueType> ValueType get(Class<ValueType> type, Collection<Property<?>> props, String aKey)
Collection.type - property typeprops - propertiesaKey - property keynullpublic static <ValueType> ValueType get(Class<ValueType> type, Collection<Property<?>> props, String aKey, ValueType defValue)
Collection.null;null;null;type - property typeprops - propertiesaKey - property keydefValue - default valuenullpublic static <ValueType> ValueType get(Class<ValueType> type, Map<String,Property<?>> props, String aKey)
Map.type - property typeprops - propertiesaKey - property keynullpublic static <ValueType> ValueType get(Class<ValueType> type, Map<String,Property<?>> props, String aKey, ValueType defValue)
Map.null;null;null;type - property typeprops - propertiesaKey - property keydefValue - default valuenullpublic static <ValueType> ValueType get(Class<ValueType> type, Property<?> prop)
Property.type - property typeprop - propertynullpublic static <ValueType> ValueType get(Class<ValueType> type, Property<?> prop, ValueType defValue)
Property.null;null;null;type - property typeprop - propertydefValue - default valuenullCopyright © 2013–2019 BB Corp. All rights reserved.