Package org.midheaven.io
Class ByteContentSize
java.lang.Object
org.midheaven.io.ByteContentSize
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanPerforms equals.static ByteContentSizefromBytes(long size) Returns from Bytes.inthashCode()Checks whether hash Code.in(ByteContentSizeUnit targetUnit) Performs in.longinBytes()Performs inBytes.static ByteContentSizeof(long size, ByteContentSizeUnit unit) Creates an instance from the provided value.static ByteContentSizeof(Rational size, ByteContentSizeUnit unit) Creates an instance from the provided value.
-
Field Details
-
ZERO
Constant for ZERO.
-
-
Method Details
-
fromBytes
Returns from Bytes.- Parameters:
size- the size value- Returns:
- the result of fromBytes
-
of
Creates an instance from the provided value.- Parameters:
size- the size valueunit- the unit value- Returns:
- the result of of
-
of
Creates an instance from the provided value.- Parameters:
size- the size valueunit- the unit value- Returns:
- the result of of
-
inBytes
public long inBytes()Performs inBytes.- Returns:
- the result of inBytes
-
in
Performs in.- Parameters:
targetUnit- the targetUnit value- Returns:
- the result of in
-
equals
Performs equals. -
hashCode
public int hashCode()Checks whether hash Code.
-