Class ByteSize.Default
java.lang.Object
one.microstream.configuration.types.ByteSize.Default
- All Implemented Interfaces:
Comparable<ByteSize>
,ByteSize
- Enclosing interface:
- ByteSize
public static class ByteSize.Default extends Object implements ByteSize
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.configuration.types.ByteSize
ByteSize.Default
-
Method Summary
-
Method Details
-
amount
public double amount()Description copied from interface:ByteSize
Gets the amount of thisByteSize
. -
unit
Description copied from interface:ByteSize
Gets the unit of thisByteSize
. -
bytes
public long bytes()- Specified by:
bytes
in interfaceByteSize
- Returns:
- the total number of bytes which
ByteSize.amount()
andByteSize.unit()
yield - See Also:
ByteUnit.toBytes(double)
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ByteSize>
-
hashCode
public int hashCode() -
equals
-
toString
Description copied from interface:ByteSize
Returns the amount followed by the unit, e.g 1.2MB.- Specified by:
toString
in interfaceByteSize
- Overrides:
toString
in classObject
- Returns:
- a String representation of this byte size, which can be understood by
ByteSizeParser.parse(String)
- See Also:
ByteSize.New(String)
-