class Settings {

    public static <T extends Comparable<T>> BiFunction<T, Function<String, String>, T> range( final T min, final T max )
    {
        return new BiFunction<T, Function<String, String>, T>()
        {
            @Override
            public T apply( T from1, Function<String, String> from2 )
            {
                return min(min).apply( max(max).apply( from1, from2 ), from2 );
            }

            @Override
            public String toString()
            {
                return format( "is in the range `%s` to `%s`", min, max );
            }
        };
    }

    private  Settings();

}