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>
-
-
Constructor Summary
Constructors Constructor Description Decimal(java.lang.String pattern)Decimal(StreamInput in)
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.Stringformat(double value)Format a double value.java.lang.Stringformat(long value)Format a long value.java.lang.StringgetWriteableName()Returns the name of the writeable objectinthashCode()doubleparseDouble(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.longparseLong(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.voidwriteTo(StreamOutput out)Write this into the StreamOutput.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.search.DocValueFormat
format, parseBytesRef
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Decimal
public Decimal(java.lang.String pattern)
-
Decimal
public Decimal(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getWriteableName
public java.lang.String getWriteableName()
Description copied from interface:NamedWriteableReturns the name of the writeable object- Specified by:
getWriteableNamein interfaceNamedWriteable
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:WriteableWrite this into the StreamOutput.
-
format
public java.lang.String format(long value)
Description copied from interface:DocValueFormatFormat 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 thelonganddatefields.- Specified by:
formatin interfaceDocValueFormat
-
format
public java.lang.String format(double value)
Description copied from interface:DocValueFormatFormat 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,doubleordatefields.- Specified by:
formatin interfaceDocValueFormat
-
parseLong
public long parseLong(java.lang.String value, boolean roundUp, java.util.function.LongSupplier now)Description copied from interface:DocValueFormatParse a value that was formatted withDocValueFormat.format(long)back to the original long value.- Specified by:
parseLongin interfaceDocValueFormat
-
parseDouble
public double parseDouble(java.lang.String value, boolean roundUp, java.util.function.LongSupplier now)Description copied from interface:DocValueFormatParse a value that was formatted withDocValueFormat.format(double)back to the original double value.- Specified by:
parseDoublein interfaceDocValueFormat
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-