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

org.simpleflatmapper.csv.getter.CsvByteGetter Maven / Gradle / Ivy

package org.simpleflatmapper.csv.getter;

import org.simpleflatmapper.converter.Context;
import org.simpleflatmapper.csv.CsvRow;
import org.simpleflatmapper.map.getter.ByteContextualGetter;
import org.simpleflatmapper.map.getter.ContextualGetter;
import org.simpleflatmapper.map.getter.OptimizableIndexedContextualGetter;

public class CsvByteGetter implements ContextualGetter, ByteContextualGetter, OptimizableIndexedContextualGetter {
    public final int index;

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

    @Override
    public Byte get(CsvRow target, Context context)  {
        return get(target, context, index);
    }

    public static Byte get(CsvRow target, Context context, int index) {
        return target.getByte(index);
    }

    @Override
    public byte getByte(CsvRow target, Context context)  {
        return getByte(target, context, index);
    }

    public static byte getByte(CsvRow target, Context context, int index) {
        return target.getByte(index);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy