org.simpleflatmapper.map.getter.NullContextualGetter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-map Show documentation
Show all versions of sfm-map Show documentation
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;
}
}