Class ByteSize
- java.lang.Object
-
- io.tech1.framework.domain.hardware.bytes.ByteSize
-
public final class ByteSize extends Object
-
-
Constructor Summary
Constructors Constructor Description ByteSize(long bytes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)BigDecimalgetBy(ByteUnit unit)BigDecimalgetBy(ByteUnit unit, int scale)longgetBytes()Map<ByteUnit,Supplier<BigDecimal>>getMapping1()Map<ByteUnit,Function<Integer,BigDecimal>>getMapping2()static ByteSizegigabyte()inthashCode()static ByteSizekilobyte()static ByteSizemegabyte()StringtoString()
-
-
-
Method Detail
-
kilobyte
public static ByteSize kilobyte()
-
megabyte
public static ByteSize megabyte()
-
gigabyte
public static ByteSize gigabyte()
-
getBy
public BigDecimal getBy(ByteUnit unit)
-
getBy
public BigDecimal getBy(ByteUnit unit, int scale)
-
getMapping1
public Map<ByteUnit,Supplier<BigDecimal>> getMapping1()
-
getMapping2
public Map<ByteUnit,Function<Integer,BigDecimal>> getMapping2()
-
getBytes
public long getBytes()
-
-