Package org.silverpeas.core.util.memory
Enum MemoryUnit
- java.lang.Object
-
- java.lang.Enum<MemoryUnit>
-
- org.silverpeas.core.util.memory.MemoryUnit
-
- All Implemented Interfaces:
Serializable
,Comparable<MemoryUnit>
public enum MemoryUnit extends Enum<MemoryUnit>
User: Yohann Chastagnier Date: 15/11/13
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getBundleDefault()
protected String
getBundleKey()
String
getLabel()
String
getLabel(String language)
BigDecimal
getLimit()
int
getPower()
static MemoryUnit
valueOf(String name)
Returns the enum constant of this type with the specified name.static MemoryUnit[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
B
public static final MemoryUnit B
-
KB
public static final MemoryUnit KB
-
MB
public static final MemoryUnit MB
-
GB
public static final MemoryUnit GB
-
TB
public static final MemoryUnit TB
-
-
Method Detail
-
values
public static MemoryUnit[] 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 (MemoryUnit c : MemoryUnit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MemoryUnit 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 nameNullPointerException
- if the argument is null
-
getBundleKey
protected String getBundleKey()
-
getBundleDefault
protected String getBundleDefault()
-
getLabel
public String getLabel()
-
getLimit
public BigDecimal getLimit()
-
getPower
public int getPower()
-
-