public final class ConfigurableParameters
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.Boolean |
getBool(KeyValuePair<java.lang.String,java.lang.Boolean> kvp)
Gets the value of an Boolean key if it exists, otherwise returns the specified default value.
|
static java.lang.Character |
getChar(KeyValuePair<java.lang.String,java.lang.Character> kvp)
Gets the value of a Char key if it exists, otherwise returns the specified default value.
|
static org.joda.time.LocalDateTime |
getDateTime(KeyValuePair<java.lang.String,org.joda.time.LocalDateTime> kvp)
Gets the value of a DateTime key if it exists, otherwise returns the specified default value.
|
static java.math.BigDecimal |
getDecimal(KeyValuePair<java.lang.String,java.math.BigDecimal> kvp)
Gets the value of a Decimal key if it exists, otherwise returns the specified default value.
|
static java.lang.Double |
getDouble(KeyValuePair<java.lang.String,java.lang.Double> kvp)
Gets the value of a Double key if it exists, otherwise returns the specified default value.
|
static java.lang.Float |
getFloat(KeyValuePair<java.lang.String,java.lang.Float> kvp)
Gets the value of a Float key if it exists, otherwise returns the specified default value.
|
static java.lang.Short |
getInt16(KeyValuePair<java.lang.String,java.lang.Short> kvp)
Gets the value of an Int16 key if it exists, otherwise returns the specified default value.
|
static int |
getInt32(KeyValuePair<java.lang.String,java.lang.Integer> kvp)
Gets the value of an Int32 key if it exists, otherwise returns the specified default value.
|
static java.lang.Long |
getInt64(KeyValuePair<java.lang.String,java.lang.Long> kvp)
Gets the value of an Int64 key if it exists, otherwise returns the specified default value.
|
static java.lang.Byte |
getInt8(KeyValuePair<java.lang.String,java.lang.Byte> kvp)
Gets the value of an SByte key if it exists, otherwise returns the specified default value.
|
static java.net.InetAddress |
getIPAddress(KeyValuePair<java.lang.String,java.net.InetAddress> kvp)
Gets the value of a IPAddress key if it exists, otherwise returns the specified default value.
|
static <T> java.lang.Iterable<T> |
getIterable(KeyValuePair<java.lang.String,ReifiedIterable<T>> kvp)
Gets the value of an Iterable if it exists, otherwise returns the specified default value.
|
static java.lang.Object |
getObject(KeyValuePair<java.lang.String,java.lang.String> kvp,
java.lang.Object[] constructorArgs)
Gets the type name of an object from the configured parameter and instantiates it.
|
static java.lang.String |
getString(KeyValuePair<java.lang.String,java.lang.String> kvp)
Gets the value of a String key if it exists, otherwise returns the specified default value.
|
static org.joda.time.Duration |
getTimeSpan(KeyValuePair<java.lang.String,org.joda.time.Duration> kvp)
Gets the value of a TimeSpan key if it exists, otherwise returns the specified default value.
|
static java.lang.Class<?> |
getType(KeyValuePair<java.lang.String,java.lang.String> kvp)
Gets the type name from the configured parameters and attempts to parse it, returning a Type.
|
static UnsignedShort |
getUInt16(KeyValuePair<java.lang.String,UnsignedShort> kvp)
Gets the value of a UInt16 key if it exists, otherwise returns the specified default value.
|
static UnsignedInteger |
getUInt32(KeyValuePair<java.lang.String,UnsignedInteger> kvp)
Gets the value of a UInt32 key if it exists, otherwise returns the specified default value.
|
static UnsignedLong |
getUInt64(KeyValuePair<java.lang.String,UnsignedLong> kvp)
Gets the value of a UInt64 key if it exists, otherwise returns the specified default value.
|
static UnsignedByte |
getUInt8(KeyValuePair<java.lang.String,UnsignedByte> kvp)
Gets the value of an UnsignedByte key if it exists, otherwise returns the specified default value.
|
static java.util.UUID |
getUuid(KeyValuePair<java.lang.String,java.util.UUID> kvp)
Gets the value of a UUID key if it exists, otherwise returns the specified default value.
|
static <T> java.lang.Iterable<T> |
tryGetIterable(KeyValuePair<java.lang.String,ReifiedIterable<T>> kvp)
Gets the value of an Iterable if it exists, otherwise returns the specified default value.
|
public static java.lang.Long getInt64(KeyValuePair<java.lang.String,java.lang.Long> kvp)
public static UnsignedLong getUInt64(KeyValuePair<java.lang.String,UnsignedLong> kvp)
public static int getInt32(KeyValuePair<java.lang.String,java.lang.Integer> kvp)
public static UnsignedInteger getUInt32(KeyValuePair<java.lang.String,UnsignedInteger> kvp)
public static java.lang.Short getInt16(KeyValuePair<java.lang.String,java.lang.Short> kvp)
public static UnsignedShort getUInt16(KeyValuePair<java.lang.String,UnsignedShort> kvp)
public static UnsignedByte getUInt8(KeyValuePair<java.lang.String,UnsignedByte> kvp)
public static java.lang.Byte getInt8(KeyValuePair<java.lang.String,java.lang.Byte> kvp)
public static java.lang.Boolean getBool(KeyValuePair<java.lang.String,java.lang.Boolean> kvp)
public static java.lang.Character getChar(KeyValuePair<java.lang.String,java.lang.Character> kvp)
public static org.joda.time.LocalDateTime getDateTime(KeyValuePair<java.lang.String,org.joda.time.LocalDateTime> kvp)
public static java.math.BigDecimal getDecimal(KeyValuePair<java.lang.String,java.math.BigDecimal> kvp)
public static java.lang.Double getDouble(KeyValuePair<java.lang.String,java.lang.Double> kvp)
public static java.lang.Float getFloat(KeyValuePair<java.lang.String,java.lang.Float> kvp)
public static java.util.UUID getUuid(KeyValuePair<java.lang.String,java.util.UUID> kvp)
public static java.net.InetAddress getIPAddress(KeyValuePair<java.lang.String,java.net.InetAddress> kvp)
public static java.lang.String getString(KeyValuePair<java.lang.String,java.lang.String> kvp)
public static org.joda.time.Duration getTimeSpan(KeyValuePair<java.lang.String,org.joda.time.Duration> kvp)
public static java.lang.Object getObject(KeyValuePair<java.lang.String,java.lang.String> kvp, java.lang.Object[] constructorArgs) throws ConfigurationErrorsException
ConfigurationErrorsException
- Failed to instantiate the default (provided) objectpublic static java.lang.Class<?> getType(KeyValuePair<java.lang.String,java.lang.String> kvp) throws ConfigurationErrorsException
ConfigurationErrorsException
- Failed to parse the default (provided) class typepublic static <T> java.lang.Iterable<T> tryGetIterable(KeyValuePair<java.lang.String,ReifiedIterable<T>> kvp)
ConfigurationErrorsException
- There was a problem in successfully parsing or re-configuring an Iterable valuepublic static <T> java.lang.Iterable<T> getIterable(KeyValuePair<java.lang.String,ReifiedIterable<T>> kvp) throws ConfigurationErrorsException
ConfigurationErrorsException
- There was a problem in successfully parsing or re-configuring an Iterable value