| Enum Constant and Description |
|---|
BYTE |
EXA_BYTE |
GIGA_BYTE |
KILO_BYTE |
MEGA_BYTE |
PETA_BYTE |
TERA_BYTE |
| Modifier and Type | Method and Description |
|---|---|
abstract double |
convert(double count,
ByteUnit sourceUnit) |
abstract long |
convert(long count,
ByteUnit sourceUnit) |
static ByteUnit |
getByDisplay(java.lang.String display) |
static ByteUnit |
getByShortDisplay(java.lang.String shortDisplay) |
java.lang.String |
getDisplay() |
java.lang.String |
getShortDisplay() |
abstract double |
toBytes(double count) |
abstract long |
toBytes(long count) |
abstract double |
toExaBytes(double count) |
abstract long |
toExaBytes(long count) |
abstract double |
toGigaBytes(double count) |
abstract long |
toGigaBytes(long count) |
abstract double |
toKiloBytes(double count) |
abstract long |
toKiloBytes(long count) |
abstract double |
toMegaBytes(double count) |
abstract long |
toMegaBytes(long count) |
abstract double |
toPetaBytes(double count) |
abstract long |
toPetaBytes(long count) |
java.lang.String |
toString() |
abstract double |
toTeraBytes(double count) |
abstract long |
toTeraBytes(long count) |
static ByteUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ByteUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ByteUnit BYTE
public static final ByteUnit KILO_BYTE
public static final ByteUnit MEGA_BYTE
public static final ByteUnit GIGA_BYTE
public static final ByteUnit TERA_BYTE
public static final ByteUnit PETA_BYTE
public static final ByteUnit EXA_BYTE
public static ByteUnit[] values()
for (ByteUnit c : ByteUnit.values()) System.out.println(c);
public static ByteUnit valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant
with the specified namejava.lang.NullPointerException - if the argument is null@Nonnull public static ByteUnit getByDisplay(@Nonnull java.lang.String display) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException@Nonnull public static ByteUnit getByShortDisplay(@Nonnull java.lang.String shortDisplay) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException@Nonnegative
public abstract long convert(@Nonnegative
long count,
@Nonnull
ByteUnit sourceUnit)
@Nonnegative
public abstract double convert(@Nonnegative
double count,
@Nonnull
ByteUnit sourceUnit)
@Nonnegative
public abstract long toBytes(@Nonnegative
long count)
@Nonnegative
public abstract long toKiloBytes(@Nonnegative
long count)
@Nonnegative
public abstract long toMegaBytes(@Nonnegative
long count)
@Nonnegative
public abstract long toGigaBytes(@Nonnegative
long count)
@Nonnegative
public abstract long toTeraBytes(@Nonnegative
long count)
@Nonnegative
public abstract long toPetaBytes(@Nonnegative
long count)
@Nonnegative
public abstract long toExaBytes(@Nonnegative
long count)
@Nonnegative
public abstract double toBytes(@Nonnegative
double count)
@Nonnegative
public abstract double toKiloBytes(@Nonnegative
double count)
@Nonnegative
public abstract double toMegaBytes(@Nonnegative
double count)
@Nonnegative
public abstract double toGigaBytes(@Nonnegative
double count)
@Nonnegative
public abstract double toTeraBytes(@Nonnegative
double count)
@Nonnegative
public abstract double toPetaBytes(@Nonnegative
double count)
@Nonnegative
public abstract double toExaBytes(@Nonnegative
double count)
@Nonnull public java.lang.String getDisplay()
@Nonnull public java.lang.String getShortDisplay()
public java.lang.String toString()
toString in class java.lang.Enum<ByteUnit>Copyright © 2013 echocat. All Rights Reserved.