public class SimplePropertyDefinition extends Object implements PropertyDefinition
PropertyDefinition
for convenience of implementors.Constructor and Description |
---|
SimplePropertyDefinition(String key,
boolean optional,
TypeConverter typeConverter) |
SimplePropertyDefinition(String key,
boolean optional,
TypeConverter typeConverter,
ValueValidator validator) |
SimplePropertyDefinition(String key,
TypeConverter typeConverter) |
Modifier and Type | Method and Description |
---|---|
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()
The
TypeConverter 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.
|
public SimplePropertyDefinition(String key, TypeConverter typeConverter)
public SimplePropertyDefinition(String key, boolean optional, TypeConverter typeConverter)
public SimplePropertyDefinition(String key, boolean optional, TypeConverter typeConverter, ValueValidator validator)
public TypeConverter typeConverter()
PropertyDefinition
TypeConverter
to be used to convert the
string value read from XML to the expected type automatically.typeConverter
in interface PropertyDefinition
public String key()
PropertyDefinition
key
in interface PropertyDefinition
public ValueValidator validator()
PropertyDefinition
validator
in interface PropertyDefinition
null
in case
there is no validation required.public boolean optional()
PropertyDefinition
ValueValidator
test.optional
in interface PropertyDefinition
true
if this property is optional, false
otherwiseCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.