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
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
long
getGiga()
double
long
getKilo()
double
long
getMega()
double
long
getPeta()
double
long
long
getTera()
double
long
giga()
double
gigaFrac()
int
hashCode()
long
kilo()
double
kiloFrac()
long
mega()
double
megaFrac()
static SizeValue
parseSizeValue(String sValue)
static SizeValue
parseSizeValue(String sValue, SizeValue defaultValue)
long
peta()
double
petaFrac()
long
singles()
long
tera()
double
teraFrac()
toString()
void
writeTo(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:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in 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:
compareTo
in interfaceComparable<SizeValue>
-