org.apfloat.internal
Class IntDataStorageBuilder
java.lang.Object
org.apfloat.internal.IntDataStorageBuilder
- All Implemented Interfaces:
- DataStorageBuilder
- public class IntDataStorageBuilder
- extends Object
- implements DataStorageBuilder
Default data storage creation strategy for the int
data type.
- Version:
- 1.0
- Author:
- Mikko Tommila
- See Also:
IntMemoryDataStorage
,
IntDiskDataStorage
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntDataStorageBuilder
public IntDataStorageBuilder()
- Default constructor.
createDataStorage
public DataStorage createDataStorage(long size)
throws ApfloatRuntimeException
- Description copied from interface:
DataStorageBuilder
- Get an appropriate type of data storage for the requested size of data.
Note that the returned data storage object is not set to have the
requested size, so the client should call the object's DataStorage.setSize(long)
method before storing data to it.
- Specified by:
createDataStorage
in interface DataStorageBuilder
- Parameters:
size
- The size of data to be stored in the storage, in bytes.
- Returns:
- An empty
DataStorage
object of an appropriate type for storing size
bytes of data.
- Throws:
ApfloatRuntimeException