001package org.unix4j.convert; 002 003/** 004 * A converter for values of an arbitrary type into the target type specified by 005 * the generic parameter {@code V}. 006 * 007 * @param <V> the value target type after the conversion 008 */ 009public interface ValueConverter<V> { 010 /** 011 * Converts the given value into the target type {@code V} if it is not null 012 * and if such a conversion is supported by this converter. Returns null if 013 * the specified value is null or if the value cannot be converted. 014 * 015 * @param value 016 * the unconverted value 017 * @return the converted value or null if the value is null or cannot be 018 * converted 019 */ 020 V convert(Object value); 021}