public class ByteSize extends Object implements Validateable<ByteSize>
| Modifier and Type | Class and Description |
|---|---|
static class |
ByteSize.Unit |
| Constructor and Description |
|---|
ByteSize() |
| Modifier and Type | Method and Description |
|---|---|
static ByteSize |
of(long value,
ByteSize.Unit unit) |
long |
toBytes() |
ByteSize |
validate() |
public static ByteSize of(long value, ByteSize.Unit unit)
public ByteSize validate()
validate in interface Validateable<ByteSize>this if valid. Throw RuntimeException if not valid.public long toBytes()
#getValue() * #getUnit().Copyright © 2018. All rights reserved.