public static final class DataStorageSpec.IntKibibytesBound extends DataStorageSpec
DataStorageSpec.DataStorageUnit, DataStorageSpec.IntBytesBound, DataStorageSpec.IntKibibytesBound, DataStorageSpec.IntMebibytesBound, DataStorageSpec.LongBytesBound, DataStorageSpec.LongMebibytesBound
Constructor and Description |
---|
IntKibibytesBound(long kibibytes)
Creates a
DataStorageSpec.IntKibibytesBound of the specified amount in kibibytes. |
IntKibibytesBound(long quantity,
DataStorageSpec.DataStorageUnit unit)
Creates a
DataStorageSpec.IntKibibytesBound of the specified amount in the specified unit. |
IntKibibytesBound(java.lang.String value)
Creates a
DataStorageSpec.IntKibibytesBound 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() |
int |
toKibibytes()
Returns the amount of data storage in kibibytes as an
int |
public IntKibibytesBound(java.lang.String value)
DataStorageSpec.IntKibibytesBound
of the specified amount.value
- the data storagepublic IntKibibytesBound(long quantity, DataStorageSpec.DataStorageUnit unit)
DataStorageSpec.IntKibibytesBound
of the specified amount in the specified unit.quantity
- where quantity shouldn't be bigger than Integer.MAX_VALUE - 1 in kibibytesunit
- in which the provided quantity ispublic IntKibibytesBound(long kibibytes)
DataStorageSpec.IntKibibytesBound
of the specified amount in kibibytes.kibibytes
- where kibibytes 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 long toBytesInLong()
Copyright © 2009- The Apache Software Foundation