public static final class DocValueFormat.Decimal extends java.lang.Object implements DocValueFormat
DocValueFormat.DateTime, DocValueFormat.Decimal
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
BOOLEAN, GEOHASH, IP, RAW
Constructor and Description |
---|
Decimal(StreamInput in) |
Decimal(java.lang.String pattern) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
format(org.apache.lucene.util.BytesRef value)
Format a double value.
|
java.lang.String |
format(double value)
Format a double value.
|
java.lang.String |
format(long value)
Format a long 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.IOException
public java.lang.String getWriteableName()
NamedWriteable
getWriteableName
in interface NamedWriteable
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
public java.lang.String format(long value)
DocValueFormat
long
and date
fields.format
in interface DocValueFormat
public java.lang.String format(double value)
DocValueFormat
long
, double
or date
fields.format
in interface DocValueFormat
public java.lang.String format(org.apache.lucene.util.BytesRef value)
DocValueFormat
keyword
and ip
fields.format
in interface DocValueFormat
public long parseLong(java.lang.String value, boolean roundUp, java.util.function.LongSupplier now)
DocValueFormat
DocValueFormat.format(long)
back to the
original long value.parseLong
in interface DocValueFormat
public double parseDouble(java.lang.String value, boolean roundUp, java.util.function.LongSupplier now)
DocValueFormat
DocValueFormat.format(double)
back to
the original double value.parseDouble
in interface DocValueFormat
public org.apache.lucene.util.BytesRef parseBytesRef(java.lang.String value)
DocValueFormat
DocValueFormat.format(BytesRef)
back
to the original BytesRef.parseBytesRef
in interface DocValueFormat
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object