public static final class DataStorageSpec.IntMebibytesBound extends DataStorageSpec
DataStorageSpec.DataStorageUnit, DataStorageSpec.IntBytesBound, DataStorageSpec.IntKibibytesBound, DataStorageSpec.IntMebibytesBound, DataStorageSpec.LongBytesBound, DataStorageSpec.LongMebibytesBound
Constructor and Description |
---|
IntMebibytesBound(long mebibytes)
Creates a
DataStorageSpec.IntMebibytesBound of the specified amount in mebibytes. |
IntMebibytesBound(long quantity,
DataStorageSpec.DataStorageUnit unit)
Creates a
DataStorageSpec.IntMebibytesBound of the specified amount in the specified unit. |
IntMebibytesBound(java.lang.String value)
Creates a
DataStorageSpec.IntMebibytesBound of the specified amount. |
Modifier and Type | Method and Description |
---|---|
int |
toBytes()
Returns the amount of data storage in bytes as an
int |
long |
toBytesInLong()
Returns the amount of data storage in bytes as
long |
int |
toKibibytes()
Returns the amount of data storage in kibibytes as an
int |
int |
toMebibytes()
Returns the amount of data storage in mebibytes as an
int |
public IntMebibytesBound(java.lang.String value)
DataStorageSpec.IntMebibytesBound
of the specified amount.value
- the data storagepublic IntMebibytesBound(long quantity, DataStorageSpec.DataStorageUnit unit)
DataStorageSpec.IntMebibytesBound
of the specified amount in the specified unit.quantity
- where quantity shouldn't be bigger than Integer.MAX_VALUE - 1 in mebibytesunit
- in which the provided quantity ispublic IntMebibytesBound(long mebibytes)
DataStorageSpec.IntMebibytesBound
of the specified amount in mebibytes.mebibytes
- where mebibytes shouldn't be bigger than Integer.MAX_VALUE-1public int toBytes()
int
Integer.MAX_VALUE
if the number of bytes is too large.public int toKibibytes()
int
Integer.MAX_VALUE
if the number of kibibytes is too large.public int toMebibytes()
int
Integer.MAX_VALUE
if the number of mebibytes is too large.public long toBytesInLong()
long
Copyright © 2009-2022 The Apache Software Foundation