public class DblProp extends PropertyBase<Double>
BigDecimal configuration Property
Parsing values from strings is done by the DblType, which parses values using the
Double.parseDouble(String). Note that the parseDouble method accepts a trailing
'D' of 'F' (lower case is ok too).
E.g., here are several acceptable ways to spec double value in a properties file:
name.of.my.double.property.MY_PROPERTY_1 = 90.00
name.of.my.double.property.MY_PROPERTY_2 = 80.00D
name.of.my.double.property.MY_PROPERTY_3 = 70.00F
name.of.my.double.property.MY_PROPERTY_4 = 60.00d
name.of.my.double.property.MY_PROPERTY_5 = 4
Before parsing String values, the TrimToNullTrimmer is applied by default.
| Modifier and Type | Class and Description |
|---|---|
static class |
DblProp.DblBuilder |
| Constructor and Description |
|---|
DblProp(Double defaultValue,
boolean required,
String shortDesc,
List<Validator<Double>> validators,
List<Name> aliases,
PropertyType paramType,
ValueType<Double> valueType,
Trimmer trimmer,
String helpText) |
| Modifier and Type | Method and Description |
|---|---|
static DblProp.DblBuilder |
builder()
A chainable builder for this property that should terminate with
build() |
getDefaultValue, getDescription, getExplicitValue, getHelpText, getPropertyType, getRequestedAliases, getTrimmer, getValidators, getValue, getValueType, isNonNullRequiredclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCanonicalName, getInAliases, getOutAliases, getValueAsString, isExplicitlySetpublic static DblProp.DblBuilder builder()
build()
Use as DblProp.builder()...series of builder methods...build();
Copyright © 2022. All rights reserved.