public final class ExpressionUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.threeten.bp.format.DateTimeFormatter |
JSON_DATETIME_FORMAT |
| Modifier and Type | Method and Description |
|---|---|
static BigDecimal |
decimalPow(BigDecimal number,
BigDecimal power)
Pow for two decimals
|
static String |
formatJsonDate(org.threeten.bp.Instant value)
Formats a time instant as ISO8601 in UTC with millisecond precision, e.g.
|
static org.threeten.bp.format.DateTimeFormatter |
getDateFormatter(DateStyle dateStyle,
boolean incTime)
Gets a formatter for dates or datetimes
|
static <K,V> V |
getOrDefault(Map<K,V> map,
K key,
V defaultValue)
Replacement for Java 8's Map#getOrDefault(String, Object)
|
static org.threeten.bp.Instant |
parseJsonDate(String value)
Parses an ISO8601 formatted time instant from a string value
|
static <T> List<T> |
slice(List<T> list,
Integer start,
Integer stop)
Slices a list, Python style
|
static String[] |
tokenize(String text)
Tokenizes a string by splitting on non-word characters.
|
static String |
urlquote(String text)
Encodes text for inclusion in a URL query string.
|
protected static org.threeten.bp.format.DateTimeFormatter JSON_DATETIME_FORMAT
public static <T> List<T> slice(List<T> list, Integer start, Integer stop)
list - the liststart - the start index (null means the beginning of the list)stop - the stop index (null means the end of the list)public static BigDecimal decimalPow(BigDecimal number, BigDecimal power)
public static String urlquote(String text)
text - the text to encodepublic static org.threeten.bp.format.DateTimeFormatter getDateFormatter(DateStyle dateStyle, boolean incTime)
dateStyle - whether parsing should be day-first or month-firstincTime - whether to include timepublic static <K,V> V getOrDefault(Map<K,V> map, K key, V defaultValue)
public static String[] tokenize(String text)
text - the input textpublic static String formatJsonDate(org.threeten.bp.Instant value)
public static org.threeten.bp.Instant parseJsonDate(String value)
Copyright © 2015. All rights reserved.