DoubleToFloatConversion
, DoubleToIntegerConversion
, FloatToDoubleConversion
, FloatToIntegerConversion
, IntegerToFloatConversion
, IntegralDoubleToIntegralFloatConversion
, IntegralDoubleToIntegralIntegerConversion
, IntegralFloatToIntegralDoubleConversion
, IntegralFloatToIntegralIntegerConversion
, IntegralIntegerToIntegralFloatConversion
, ZeroToIntegerConversion
public interface Conversion<S,T>
Modifier and Type | Method | Description |
---|---|---|
T |
apply(S value) |
Applies the conversion
|
default Optional<Type<? extends T>> |
resolveReturnType(Type<? extends S> source,
Type<? extends T> target) |
Helps the compiler to resolve the return type for a possible conversion.
|
default Optional<Type<? extends T>> resolveReturnType(Type<? extends S> source, Type<? extends T> target)
This method is invoked by the compiler due to one of the following conditions:
The default implementation will handle the aforementioned cases as follows:
source
- The source type. It is ensured to be a concrete typetarget
- The target type. Could be either a non-template or an unbounded templateCopyright © 2019. All rights reserved.