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

org.simpleflatmapper.map.getter.NullContextualGetter Maven / Gradle / Ivy

Go to download

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

The newest version!
package org.simpleflatmapper.map.getter;

import org.simpleflatmapper.converter.Context;

public class NullContextualGetter implements ContextualGetter {

    private static final NullContextualGetter NULL_GETTER = new NullContextualGetter();

    private NullContextualGetter() {
    }

    @Override
    public String toString() {
        return "NullGetter{}";
    }

    @Override
    public P get(T target, Context context) {
        return null;
    }

    @SuppressWarnings("unchecked")
    public static  ContextualGetter getter() {
        return NULL_GETTER;
    }

    public static boolean isNull(ContextualGetter getter) {
        return getter == null || getter == NULL_GETTER;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy