All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sfm.datastax.impl.getter.DatastaxFloatGetter Maven / Gradle / Ivy

There is a newer version: 8.2.3
Show newest version
package org.sfm.datastax.impl.getter;

import com.datastax.driver.core.GettableByIndexData;
import org.sfm.reflect.Getter;
import org.sfm.reflect.primitive.FloatGetter;

public class DatastaxFloatGetter implements FloatGetter, Getter {

    private final int index;

    public DatastaxFloatGetter(int index) {
        this.index = index;
    }

    @Override
    public Float get(GettableByIndexData target) throws Exception {
        if (target.isNull(index)) {
            return null;
        }
        return getFloat(target);
    }

    @Override
    public float getFloat(GettableByIndexData target) throws Exception {
        return target.getFloat(index);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy