class TypeMap {

    public static SampleDimensionType getSampleDimensionType(final Range<?> range) {
        final Class<?> type = range.getElementClass();
        if (Double.class.isAssignableFrom(type)) {
            return REAL_64BITS;
        }
        if (Float.class.isAssignableFrom(type)) {
            return REAL_32BITS;
        }
        long min = ((Number) range.getMinValue()).longValue();
        long max = ((Number) range.getMaxValue()).longValue();
        if (!range.isMinIncluded()) min++;
        if (!range.isMaxIncluded()) max--;
        return getSampleDimensionType(min, max);
    }

    private  TypeMap(final SampleDimensionType code,
                    final int     type,   final byte    size,
                    final boolean signed, final boolean real,
                    final Map<Number,Number> pool);
    private  TypeMap(final SampleDimensionType code,
                    final int     type,   final byte    size,
                    final boolean signed, final boolean real,
                    Number lower, Number upper, final Map<Number,Number> pool);

}