Package org.elasticsearch.search
Class DocValueFormat.Decimal
java.lang.Object
org.elasticsearch.search.DocValueFormat.Decimal
- All Implemented Interfaces:
NamedWriteable
,Writeable
,DocValueFormat
- Enclosing interface:
- DocValueFormat
public static final class DocValueFormat.Decimal extends java.lang.Object implements DocValueFormat
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.search.DocValueFormat
DocValueFormat.DateTime, DocValueFormat.Decimal
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
Fields inherited from interface org.elasticsearch.search.DocValueFormat
BIGINTEGER_2_64_MINUS_ONE, BINARY, BOOLEAN, GEOHASH, GEOTILE, IP, MASK_2_63, RAW, UNSIGNED_LONG_SHIFTED
-
Constructor Summary
Constructors Constructor Description Decimal(java.lang.String pattern)
Decimal(StreamInput in)
-
Method Summary
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
getWriteableName()
Returns the name of the writeable objectint
hashCode()
double
parseDouble(java.lang.String value, boolean roundUp, java.util.function.LongSupplier now)
Parse a value that was formatted withDocValueFormat.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 withDocValueFormat.format(long)
back to the original long value.java.lang.String
toString()
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.search.DocValueFormat
format, parseBytesRef
-
Field Details
-
NAME
public static final java.lang.String NAME- See Also:
- Constant Field Values
-
-
Constructor Details
-
Decimal
public Decimal(java.lang.String pattern) -
Decimal
- Throws:
java.io.IOException
-
-
Method Details
-
getWriteableName
public java.lang.String getWriteableName()Description copied from interface:NamedWriteable
Returns the name of the writeable object- Specified by:
getWriteableName
in interfaceNamedWriteable
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput. -
format
public java.lang.String format(long value)Description copied from interface:DocValueFormat
Format a long value. This is used by terms and histogram aggregations to format keys for fields that use longs as a doc value representation such as thelong
anddate
fields.- Specified by:
format
in interfaceDocValueFormat
-
format
public java.lang.String format(double value)Description copied from interface:DocValueFormat
Format a double value. This is used by terms and stats aggregations to format keys for fields that use numbers as a doc value representation such as thelong
,double
ordate
fields.- Specified by:
format
in interfaceDocValueFormat
-
parseLong
public long parseLong(java.lang.String value, boolean roundUp, java.util.function.LongSupplier now)Description copied from interface:DocValueFormat
Parse a value that was formatted withDocValueFormat.format(long)
back to the original long value.- Specified by:
parseLong
in interfaceDocValueFormat
-
parseDouble
public double parseDouble(java.lang.String value, boolean roundUp, java.util.function.LongSupplier now)Description copied from interface:DocValueFormat
Parse a value that was formatted withDocValueFormat.format(double)
back to the original double value.- Specified by:
parseDouble
in interfaceDocValueFormat
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-