public static class ValueFormatter.DateTime extends Object implements ValueFormatter
ValueFormatter.DateTime, ValueFormatter.GeoHash, ValueFormatter.IPv4Formatter, ValueFormatter.Number, ValueFormatter.Raw| Modifier and Type | Field and Description |
|---|---|
static ValueFormatter |
DEFAULT |
GEOHASH, IPv4, RAW| Constructor and Description |
|---|
DateTime(FormatDateTimeFormatter formatter) |
DateTime(String format) |
| Modifier and Type | Method and Description |
|---|---|
String |
format(double value)
The
|
String |
format(long time)
Formats the given millis time value (since the epoch) to string.
|
byte |
id()
Uniquely identifies this formatter (used for efficient serialization)
|
static ValueFormatter.DateTime |
mapper(DateFieldMapper mapper) |
void |
readFrom(StreamInput in) |
void |
writeTo(StreamOutput out) |
public static final ValueFormatter DEFAULT
public DateTime(String format)
public DateTime(FormatDateTimeFormatter formatter)
public static ValueFormatter.DateTime mapper(DateFieldMapper mapper)
public String format(long time)
ValueFormatterformat in interface ValueFormattertime - The long value to format.public String format(double value)
ValueFormatterformat in interface ValueFormattervalue - double The double value to format.public byte id()
ValueFormatterid in interface ValueFormatterpublic void readFrom(StreamInput in) throws IOException
readFrom in interface StreamableIOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamableIOExceptionCopyright © 2009–2016. All rights reserved.