org.apfloat.internal
Class FloatDataStorageBuilder

java.lang.Object
  extended by org.apfloat.internal.FloatDataStorageBuilder
All Implemented Interfaces:
DataStorageBuilder

public class FloatDataStorageBuilder
extends Object
implements DataStorageBuilder

Default data storage creation strategy for the float data type.

Version:
1.0
Author:
Mikko Tommila
See Also:
FloatMemoryDataStorage, FloatDiskDataStorage

Constructor Summary
FloatDataStorageBuilder()
          Default constructor.
 
Method Summary
 DataStorage createDataStorage(long size)
          Get an appropriate type of data storage for the requested size of data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatDataStorageBuilder

public FloatDataStorageBuilder()
Default constructor.

Method Detail

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