Package org.elasticsearch.common.unit
Class SizeValue
java.lang.Object
org.elasticsearch.common.unit.SizeValue
- All Implemented Interfaces:
Comparable<SizeValue>,Writeable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanlonggetGiga()doublelonggetKilo()doublelonggetMega()doublelonggetPeta()doublelonglonggetTera()doublelonggiga()doublegigaFrac()inthashCode()longkilo()doublekiloFrac()longmega()doublemegaFrac()static SizeValueparseSizeValue(String sValue)static SizeValueparseSizeValue(String sValue, SizeValue defaultValue)longpeta()doublepetaFrac()longsingles()longtera()doubleteraFrac()toString()voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
Constructor Details
-
SizeValue
public SizeValue(long singles) -
SizeValue
-
SizeValue
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
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
-
parseSizeValue
- Throws:
ElasticsearchParseException
-
parseSizeValue
public static SizeValue parseSizeValue(String sValue, SizeValue defaultValue) throws ElasticsearchParseException- Throws:
ElasticsearchParseException
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<SizeValue>
-