Package org.infinispan.commons.util
Enum MemoryUnit
- java.lang.Object
-
- java.lang.Enum<MemoryUnit>
-
- org.infinispan.commons.util.MemoryUnit
-
- All Implemented Interfaces:
Serializable
,Comparable<MemoryUnit>
@Deprecated public enum MemoryUnit extends Enum<MemoryUnit>
Deprecated.since 11.0, useByteQuantity
instead.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
convert(long sourceSize, MemoryUnit sourceUnit)
Deprecated.String
getSuffix()
Deprecated.static long
parseBytes(String s)
Deprecated.long
toBytes(long size)
Deprecated.long
toGibiBytes(long size)
Deprecated.long
toGigaBytes(long size)
Deprecated.long
toKibiBytes(long size)
Deprecated.long
toKiloBytes(long size)
Deprecated.long
toMebiBytes(long size)
Deprecated.long
toMegaBytes(long size)
Deprecated.long
toTebiBytes(long size)
Deprecated.long
toTeraBytes(long size)
Deprecated.static MemoryUnit
valueOf(String name)
Deprecated.Returns the enum constant of this type with the specified name.static MemoryUnit[]
values()
Deprecated.Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BYTES
public static final MemoryUnit BYTES
Deprecated.
-
KILOBYTES
public static final MemoryUnit KILOBYTES
Deprecated.
-
KIBIBYTES
public static final MemoryUnit KIBIBYTES
Deprecated.
-
MEGABYTES
public static final MemoryUnit MEGABYTES
Deprecated.
-
MEBIBYTES
public static final MemoryUnit MEBIBYTES
Deprecated.
-
GIGABYTES
public static final MemoryUnit GIGABYTES
Deprecated.
-
GIBIBYTES
public static final MemoryUnit GIBIBYTES
Deprecated.
-
TERABYTES
public static final MemoryUnit TERABYTES
Deprecated.
-
TEBIBYTES
public static final MemoryUnit TEBIBYTES
Deprecated.
-
-
Method Detail
-
values
public static MemoryUnit[] values()
Deprecated.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)
Deprecated.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
-
getSuffix
public String getSuffix()
Deprecated.
-
convert
public long convert(long sourceSize, MemoryUnit sourceUnit)
Deprecated.
-
toBytes
public long toBytes(long size)
Deprecated.
-
toKiloBytes
public long toKiloBytes(long size)
Deprecated.
-
toKibiBytes
public long toKibiBytes(long size)
Deprecated.
-
toMegaBytes
public long toMegaBytes(long size)
Deprecated.
-
toMebiBytes
public long toMebiBytes(long size)
Deprecated.
-
toGigaBytes
public long toGigaBytes(long size)
Deprecated.
-
toGibiBytes
public long toGibiBytes(long size)
Deprecated.
-
toTeraBytes
public long toTeraBytes(long size)
Deprecated.
-
toTebiBytes
public long toTebiBytes(long size)
Deprecated.
-
parseBytes
public static long parseBytes(String s)
Deprecated.
-
-