public final class ConfigMemorySize extends java.lang.Object
ofBytes(BigInteger)
to create instances.Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
static ConfigMemorySize |
ofBytes(java.math.BigInteger bytes)
Constructs a ConfigMemorySize representing the given
number of bytes.
|
static ConfigMemorySize |
ofBytes(long bytes)
Constructs a ConfigMemorySize representing the given
number of bytes.
|
long |
toBytes()
Gets the size in bytes.
|
java.math.BigInteger |
toBytesBigInteger()
Gets the size in bytes.
|
java.lang.String |
toString() |
public static ofBytes(java.math.BigInteger bytes)
bytes
- a number of bytespublic static ofBytes(long bytes)
bytes
- a number of bytespublic long toBytes()
java.lang.IllegalArgumentException
- when memory value
in bytes doesn't fit in a long value. Consider using
toBytesBigInteger()
in this case.public java.math.BigInteger toBytesBigInteger()
toBytes()
method,
except that the number of bytes returned as a
BigInteger value. Use it when memory value in bytes
doesn't fit in a long value.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object