org.apfloat.internal.IntDataStorageBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apfloat Show documentation
Show all versions of apfloat Show documentation
High performance arbitrary precision arithmetic library
package org.apfloat.internal;
import org.apfloat.ApfloatRuntimeException;
import org.apfloat.spi.DataStorage;
/**
* Default data storage creation strategy for the int
data type.
*
* @see IntMemoryDataStorage
* @see IntDiskDataStorage
*
* @version 1.7.0
* @author Mikko Tommila
*/
public class IntDataStorageBuilder
extends AbstractDataStorageBuilder
{
/**
* Default constructor.
*/
public IntDataStorageBuilder()
{
}
protected DataStorage createCachedDataStorage()
throws ApfloatRuntimeException
{
return new IntMemoryDataStorage();
}
protected DataStorage createNonCachedDataStorage()
throws ApfloatRuntimeException
{
return new IntDiskDataStorage();
}
protected boolean isCached(DataStorage dataStorage)
throws ApfloatRuntimeException
{
return (dataStorage instanceof IntMemoryDataStorage);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy