jlibs.core.lang
Enum SizeUnit

java.lang.Object
  extended by java.lang.Enum<SizeUnit>
      extended by jlibs.core.lang.SizeUnit
All Implemented Interfaces:
Serializable, Comparable<SizeUnit>

public enum SizeUnit
extends Enum<SizeUnit>

Author:
Santhosh Kumar T

Enum Constant Summary
BYTES
           
GB
           
KB
           
MB
           
 
Method Summary
 int count()
           
 int ordinal()
           
 String toString()
           
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, toString, wait, wait, wait
 

Enum Constant Detail

BYTES

public static final SizeUnit BYTES

KB

public static final SizeUnit KB

MB

public static final SizeUnit MB

GB

public static final SizeUnit GB
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

count

public int count()

ordinal

public int ordinal()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2018. All rights reserved.