public final class Rows extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends Number> |
objectToNumber(String name,
Object inputValue,
boolean throwParseExceptions)
Convert an object to a number.
|
static List<String> |
objectToStrings(Object inputValue)
Convert an object to a list of strings.
|
static List<Object> |
toGroupKey(long timeStamp,
InputRow inputRow) |
public static List<Object> toGroupKey(long timeStamp, InputRow inputRow)
timeStamp
- rollup up timestamp to be used to create group keyinputRow
- input rowpublic static List<String> objectToStrings(Object inputValue)
@Nullable public static <T extends Number> Number objectToNumber(String name, Object inputValue, boolean throwParseExceptions)
NullHandling.replaceWithDefault()
is true, this method will never return null. If false, it will return
NullHandling.defaultLongValue()
instead of null.name
- field name of the object being converted (may be used for exception messages)inputValue
- the actual object being convertedthrowParseExceptions
- whether this method should throw a ParseException
or use a default/null value
when is not numericParseException
- if the input cannot be converted to a number and throwParseExceptions
is trueCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.