org.elasticsearch.common.unit
Enum SizeUnit

java.lang.Object
  extended by java.lang.Enum<SizeUnit>
      extended by org.elasticsearch.common.unit.SizeUnit
All Implemented Interfaces:
Serializable, Comparable<SizeUnit>

public enum SizeUnit
extends Enum<SizeUnit>


Enum Constant Summary
GIGA
           
KILO
           
MEGA
           
SINGLE
           
 
Method Summary
 long toGiga(long size)
           
 long toKilo(long size)
           
 long toMega(long size)
           
 long toSingles(long size)
           
static SizeUnit valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SizeUnit[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SINGLE

public static final SizeUnit SINGLE

KILO

public static final SizeUnit KILO

MEGA

public static final SizeUnit MEGA

GIGA

public static final SizeUnit GIGA
Method Detail

values

public static SizeUnit[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SizeUnit c : SizeUnit.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SizeUnit valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

toSingles

public long toSingles(long size)

toKilo

public long toKilo(long size)

toMega

public long toMega(long size)

toGiga

public long toGiga(long size)


Copyright © 2009-2012. All Rights Reserved.