Class AbstractSwtSpinnerView.NumberToNumberConverter<F extends Number,​T extends Number>

  • Type Parameters:
    F - the 'from' type.
    T - the 'to' type.
    All Implemented Interfaces:
    org.eclipse.core.databinding.conversion.IConverter
    Enclosing class:
    AbstractSwtSpinnerView<VM extends ControlViewModel>

    protected abstract static class AbstractSwtSpinnerView.NumberToNumberConverter<F extends Number,​T extends Number>
    extends org.eclipse.core.databinding.conversion.Converter
    The abstract IConverter for spinner view that converts number to number.
    • Constructor Detail

      • NumberToNumberConverter

        public NumberToNumberConverter​(Class<F> fromType,
                                       Class<T> toType)
        Creates converter.
        Parameters:
        fromType - the type of the object
        toType -
    • Method Detail

      • doConvert

        protected abstract T doConvert​(F from)
        Converts the from value.
        Parameters:
        from - the value to convert.
        Returns:
        the converted value.