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

org.sfm.reflect.impl.ConstantLongGetter Maven / Gradle / Ivy

Go to download

Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.

There is a newer version: 2.9.8
Show newest version
package org.sfm.reflect.impl;

import org.sfm.reflect.Getter;
import org.sfm.reflect.primitive.LongGetter;

public class ConstantLongGetter implements LongGetter, Getter {
    private final long value;

    public ConstantLongGetter(long value) {
        this.value = value;
    }

    @Override
    public long getLong(Object target) throws Exception {
        return value;
    }

    @Override
    public Long get(T target) throws Exception {
        return value;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy