org.elasticsearch.common.unit
Class SizeValue

java.lang.Object
  extended by org.elasticsearch.common.unit.SizeValue
All Implemented Interfaces:
Serializable, Streamable

public class SizeValue
extends Object
implements Serializable, Streamable

See Also:
Serialized Form

Constructor Summary
SizeValue(long singles)
           
SizeValue(long size, SizeUnit sizeUnit)
           
 
Method Summary
 boolean equals(Object o)
           
 long getGiga()
           
 double getGigaFrac()
           
 long getKilo()
           
 double getKiloFrac()
           
 long getMega()
           
 double getMegaFrac()
           
 long getSingles()
           
 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)
           
 void readFrom(StreamInput in)
           
static SizeValue readSizeValue(StreamInput in)
           
 long singles()
           
 String toString()
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SizeValue

public SizeValue(long singles)

SizeValue

public SizeValue(long size,
                 SizeUnit sizeUnit)
Method Detail

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()

kiloFrac

public double kiloFrac()

getKiloFrac

public double getKiloFrac()

megaFrac

public double megaFrac()

getMegaFrac

public double getMegaFrac()

gigaFrac

public double gigaFrac()

getGigaFrac

public double getGigaFrac()

toString

public String toString()
Overrides:
toString in class Object

parseSizeValue

public static SizeValue parseSizeValue(String sValue)
                                throws ElasticSearchParseException
Throws:
ElasticSearchParseException

parseSizeValue

public static SizeValue parseSizeValue(String sValue,
                                       SizeValue defaultValue)
                                throws ElasticSearchParseException
Throws:
ElasticSearchParseException

readSizeValue

public static SizeValue readSizeValue(StreamInput in)
                               throws IOException
Throws:
IOException

readFrom

public void readFrom(StreamInput in)
              throws IOException
Specified by:
readFrom in interface Streamable
Throws:
IOException

writeTo

public void writeTo(StreamOutput out)
             throws IOException
Specified by:
writeTo in interface Streamable
Throws:
IOException

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009-2012. All Rights Reserved.