NamedWriteable, Writeable, DocValueFormatpublic static final class DocValueFormat.Decimal extends java.lang.Object implements DocValueFormat
DocValueFormat.DateTime, DocValueFormat.DecimalWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
NAME |
BOOLEAN, GEOHASH, IP, RAW| Constructor | Description |
|---|---|
Decimal(java.lang.String pattern) |
|
Decimal(StreamInput in) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object o) |
|
java.lang.String |
format(double value) |
Format a double value.
|
java.lang.String |
format(long value) |
Format a long value.
|
java.lang.String |
format(org.apache.lucene.util.BytesRef value) |
Format a binary value.
|
java.lang.String |
getWriteableName() |
Returns the name of the writeable object
|
int |
hashCode() |
|
org.apache.lucene.util.BytesRef |
parseBytesRef(java.lang.String value) |
Parse a value that was formatted with
DocValueFormat.format(BytesRef) back
to the original BytesRef. |
double |
parseDouble(java.lang.String value,
boolean roundUp,
java.util.function.LongSupplier now) |
Parse a value that was formatted with
DocValueFormat.format(double) back to
the original double value. |
long |
parseLong(java.lang.String value,
boolean roundUp,
java.util.function.LongSupplier now) |
Parse a value that was formatted with
DocValueFormat.format(long) back to the
original long value. |
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
public static final java.lang.String NAME
public Decimal(java.lang.String pattern)
public Decimal(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getWriteableName()
NamedWriteablegetWriteableName in interface NamedWriteablepublic void writeTo(StreamOutput out) throws java.io.IOException
Writeablepublic java.lang.String format(long value)
DocValueFormatlong and date fields.format in interface DocValueFormatpublic java.lang.String format(double value)
DocValueFormatlong, double or date fields.format in interface DocValueFormatpublic java.lang.String format(org.apache.lucene.util.BytesRef value)
DocValueFormatkeyword and ip fields.format in interface DocValueFormatpublic long parseLong(java.lang.String value,
boolean roundUp,
java.util.function.LongSupplier now)
DocValueFormatDocValueFormat.format(long) back to the
original long value.parseLong in interface DocValueFormatpublic double parseDouble(java.lang.String value,
boolean roundUp,
java.util.function.LongSupplier now)
DocValueFormatDocValueFormat.format(double) back to
the original double value.parseDouble in interface DocValueFormatpublic org.apache.lucene.util.BytesRef parseBytesRef(java.lang.String value)
DocValueFormatDocValueFormat.format(BytesRef) back
to the original BytesRef.parseBytesRef in interface DocValueFormatpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object