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 int
compareTo(SizeValue other)
boolean
equals(java.lang.Object o)
long
getGiga()
double
getGigaFrac()
long
getKilo()
double
getKiloFrac()
long
getMega()
double
getMegaFrac()
long
getPeta()
double
getPetaFrac()
long
getSingles()
long
getTera()
double
getTeraFrac()
long
giga()
double
gigaFrac()
int
hashCode()
long
kilo()
double
kiloFrac()
long
mega()
double
megaFrac()
static SizeValue
parseSizeValue(java.lang.String sValue)
static SizeValue
parseSizeValue(java.lang.String sValue, SizeValue defaultValue)
long
peta()
double
petaFrac()
long
singles()
long
tera()
double
teraFrac()
java.lang.String
toString()
void
writeTo(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:Writeable
Write 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:
toString
in 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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-