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() |
boolean |
isLessThan(DataSize otherSize) |
boolean |
isMoreThan(DataSize otherSize) |
boolean |
isSameOrLessThan(DataSize otherSize) |
boolean |
isSameOrMoreThan(DataSize otherSize) |
static DataSize |
kB(long value) |
static DataSize |
MB(long value) |
DataSize |
minus(DataSize otherSize) |
static DataSize |
of(long value,
DataSizeUnit unit) |
DataSize |
plus(DataSize otherSize) |
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 boolean isMoreThan(DataSize otherSize)
public boolean isSameOrMoreThan(DataSize otherSize)
public boolean isLessThan(DataSize otherSize)
public boolean isSameOrLessThan(DataSize otherSize)
public double get(DataSizeUnit unit)
public long toBytes()
public int compareTo(DataSize other)
compareTo in interface Comparable<DataSize>Copyright © 2018 Digipost. All rights reserved.