Package org.elasticsearch.common.unit
Class SizeValue
- java.lang.Object
-
- org.elasticsearch.common.unit.SizeValue
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Constructor Summary
Constructors Constructor Description SizeValue(long singles)SizeValue(long size, SizeUnit sizeUnit)SizeValue(StreamInput in)
-
Method Summary
Modifier and Type Method Description intcompareTo(SizeValue other)booleanequals(java.lang.Object o)longgetGiga()doublegetGigaFrac()longgetKilo()doublegetKiloFrac()longgetMega()doublegetMegaFrac()longgetPeta()doublegetPetaFrac()longgetSingles()longgetTera()doublegetTeraFrac()longgiga()doublegigaFrac()inthashCode()longkilo()doublekiloFrac()longmega()doublemegaFrac()static SizeValueparseSizeValue(java.lang.String sValue)static SizeValueparseSizeValue(java.lang.String sValue, SizeValue defaultValue)longpeta()doublepetaFrac()longsingles()longtera()doubleteraFrac()java.lang.StringtoString()voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
-
-
Constructor Detail
-
SizeValue
public SizeValue(long singles)
-
SizeValue
public SizeValue(long size, SizeUnit sizeUnit)
-
SizeValue
public SizeValue(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:WriteableWrite this into the StreamOutput.
-
singles
public long singles()
-
getSingles
public long getSingles()
-
kilo
public long kilo()
-
getKilo
public long getKilo()
-
mega
public long mega()
-
getMega
public long getMega()
-
giga
public long giga()
-
getGiga
public long getGiga()
-
tera
public long tera()
-
getTera
public long getTera()
-
peta
public long peta()
-
getPeta
public long getPeta()
-
kiloFrac
public double kiloFrac()
-
getKiloFrac
public double getKiloFrac()
-
megaFrac
public double megaFrac()
-
getMegaFrac
public double getMegaFrac()
-
gigaFrac
public double gigaFrac()
-
getGigaFrac
public double getGigaFrac()
-
teraFrac
public double teraFrac()
-
getTeraFrac
public double getTeraFrac()
-
petaFrac
public double petaFrac()
-
getPetaFrac
public double getPetaFrac()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
parseSizeValue
public static SizeValue parseSizeValue(java.lang.String sValue) throws ElasticsearchParseException
- Throws:
ElasticsearchParseException
-
parseSizeValue
public static SizeValue parseSizeValue(java.lang.String sValue, SizeValue defaultValue) throws ElasticsearchParseException
- Throws:
ElasticsearchParseException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-