Package com.hazelcast.config.properties
Class SimplePropertyDefinition
- java.lang.Object
-
- com.hazelcast.config.properties.SimplePropertyDefinition
-
- All Implemented Interfaces:
PropertyDefinition
public class SimplePropertyDefinition extends java.lang.Object implements PropertyDefinition
Simple immutable implementation ofPropertyDefinition
for convenience of implementors.
-
-
Constructor Summary
Constructors Constructor Description SimplePropertyDefinition(java.lang.String key, boolean optional, TypeConverter typeConverter)
SimplePropertyDefinition(java.lang.String key, boolean optional, TypeConverter typeConverter, ValueValidator validator)
SimplePropertyDefinition(java.lang.String key, TypeConverter typeConverter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
key()
Returns the key (the name) of this property inside the configuration.boolean
optional()
Defines if this property is optional or not.TypeConverter
typeConverter()
TheTypeConverter
to be used to convert the string value read from XML to the expected type automatically.ValueValidator
validator()
Returns an optional validator to validate a value before finalizing the configuration.
-
-
-
Constructor Detail
-
SimplePropertyDefinition
public SimplePropertyDefinition(java.lang.String key, TypeConverter typeConverter)
-
SimplePropertyDefinition
public SimplePropertyDefinition(java.lang.String key, boolean optional, TypeConverter typeConverter)
-
SimplePropertyDefinition
public SimplePropertyDefinition(java.lang.String key, boolean optional, TypeConverter typeConverter, ValueValidator validator)
-
-
Method Detail
-
typeConverter
public TypeConverter typeConverter()
Description copied from interface:PropertyDefinition
TheTypeConverter
to be used to convert the string value read from XML to the expected type automatically.- Specified by:
typeConverter
in interfacePropertyDefinition
- Returns:
- a defined type converter to convert from string to another type
-
key
public java.lang.String key()
Description copied from interface:PropertyDefinition
Returns the key (the name) of this property inside the configuration.- Specified by:
key
in interfacePropertyDefinition
- Returns:
- returns the property key
-
validator
public ValueValidator validator()
Description copied from interface:PropertyDefinition
Returns an optional validator to validate a value before finalizing the configuration.- Specified by:
validator
in interfacePropertyDefinition
- Returns:
- the optional validator. Is allowed to be
null
in case there is no validation required.
-
optional
public boolean optional()
Description copied from interface:PropertyDefinition
Defines if this property is optional or not. Optional properties don't have to be set inside the configuration but if set they need to pass a possibly definedValueValidator
test.- Specified by:
optional
in interfacePropertyDefinition
- Returns:
true
if this property is optional,false
otherwise
-
-