@PSOperatorWrapper public class TimeOperators extends java.lang.Object
Constructor and Description |
---|
TimeOperators() |
Modifier and Type | Method and Description |
---|---|
static Function<Item,java.lang.String> |
formatTime(java.lang.String timestampField,
java.lang.String timeFormat)
Convert the timestamp value of a field to a string based a given format.
|
static Function<java.lang.Void,java.lang.Long> |
getCurrentTime()
Get current timestamp.
|
static Function<Item,java.lang.Boolean> |
recent(java.lang.String timestampField,
java.lang.Long duration)
Check whether the timestamp field value of a field is recent from now (less than a given duration).
|
static Function<Item,java.lang.Boolean> |
since(java.lang.String timestampField,
java.lang.Long timestampToCompare)
Check whether the timestamp value of a field is after a given timestamp.
|
public static Function<Item,java.lang.Boolean> since(java.lang.String timestampField, java.lang.Long timestampToCompare)
timestampField
- the name of the timestamp fieldtimestampToCompare
- the timestamp to comparepublic static Function<Item,java.lang.Boolean> recent(java.lang.String timestampField, java.lang.Long duration)
timestampField
- the name of the timestamp fieldduration
- the millisecond duration from nowpublic static Function<java.lang.Void,java.lang.Long> getCurrentTime()
public static Function<Item,java.lang.String> formatTime(java.lang.String timestampField, java.lang.String timeFormat)
timestampField
- the name of timestamp fieldtimeFormat
- the format of time string