public final class DataSize extends Object implements Serializable, Comparable<DataSize>
| Modifier and Type | Field and Description |
|---|---|
static DataSize |
MAX |
static DataSize |
ZERO |
| Modifier and Type | Method and Description |
|---|---|
static DataSize |
bytes(long value) |
int |
compareTo(DataSize other) |
boolean |
equals(Object obj) |
static DataSize |
GB(long value) |
double |
get(DataSizeUnit unit) |
int |
hashCode() |
static DataSize |
kB(long value) |
static DataSize |
MB(long value) |
static DataSize |
of(long value,
DataSizeUnit unit) |
long |
toBytes() |
String |
toString() |
public static DataSize of(long value, DataSizeUnit unit)
public static DataSize bytes(long value)
public static DataSize kB(long value)
public static DataSize MB(long value)
public static DataSize GB(long value)
public double get(DataSizeUnit unit)
public long toBytes()
public int compareTo(DataSize other)
compareTo in interface Comparable<DataSize>Copyright © 2016 Digipost. All rights reserved.