public final class EtpUtil extends Object
Modifier and Type | Method and Description |
---|---|
static double |
getAsDouble(Object value)
Return the specified value as a double.
|
static Object |
getAsObject(double value,
Class<?> dataType)
Return the specified double value as an object of the given type.
|
static Object |
getAsType(Object value,
Class<?> dataType)
Return the specified double value as an object of the given type.
|
static String |
newUid()
Create a new universal UID according to the ETP requirements.
|
public static String newUid()
public static double getAsDouble(Object value)
value
- Value to return as double.
May be null, in case NaN will be returned.public static Object getAsObject(double value, Class<?> dataType)
value
- Value to consider.dataType
- Data type of return value. Non-null.IllegalArgumentException
- If dataType is null.public static Object getAsType(Object value, Class<?> dataType)
value
- Value to consider.dataType
- Data type of return value. Non-null.IllegalArgumentException
- If dataType is null.Copyright © 2023 Petroware AS - https://petroware.no