Package no.digipost.io
Class DataSize
java.lang.Object
no.digipost.io.DataSize
- All Implemented Interfaces:
Serializable,Comparable<DataSize>
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DataSizebytes(long value) intbooleanstatic DataSizeGB(long value) doubleget(DataSizeUnit unit) inthashCode()booleanisLessThan(DataSize otherSize) booleanisMoreThan(DataSize otherSize) booleanisSameOrLessThan(DataSize otherSize) booleanisSameOrMoreThan(DataSize otherSize) static DataSizekB(long value) static DataSizeMB(long value) static DataSizeof(long value, DataSizeUnit unit) longtoBytes()toString()
-
Field Details
-
ZERO
-
MAX
-
-
Method Details
-
of
-
bytes
-
kB
-
MB
-
GB
-
plus
-
minus
-
isMoreThan
-
isSameOrMoreThan
-
isLessThan
-
isSameOrLessThan
-
get
-
toBytes
public long toBytes() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<DataSize>
-
equals
-
hashCode
public int hashCode()
-