*/
public class MemoryDataStoreFactory implements DataStoreFactory {
@Override
public <T> WritableDataStore<T> makeStorage(DBIDs ids, int hints, Class<? super T> dataclass) {
if(ids instanceof DBIDRange) {
DBIDRange range = (DBIDRange) ids;
Object[] data = new Object[range.size()];
return new ArrayStore<T>(data, new RangeIDMap(range));
}
else {
return new MapIntegerDBIDStore<T>(ids.size());
}