Interface HasDivide<T>
-
- Type Parameters:
T- the input type
- All Known Subinterfaces:
ToBigDecimal<T>,ToBigDecimalOrElse<T>,ToBigDecimalOrElseGet<T>,ToBigDecimalOrThrow<T>,ToByte<T>,ToByteOrElse<T>,ToByteOrElseGet<T>,ToByteOrThrow<T>,ToDouble<T>,ToDoubleOrElse<T>,ToDoubleOrElseGet<T>,ToDoubleOrThrow<T>,ToFloat<T>,ToFloatOrElse<T>,ToFloatOrElseGet<T>,ToFloatOrThrow<T>,ToInt<T>,ToIntOrElse<T>,ToIntOrElseGet<T>,ToIntOrThrow<T>,ToLong<T>,ToLongOrElse<T>,ToLongOrElseGet<T>,ToLongOrThrow<T>,ToShort<T>,ToShortOrElse<T>,ToShortOrElseGet<T>,ToShortOrThrow<T>
public interface HasDivide<T>Trait that describes an expression that has severaldivide(int)-methods for generating new expressions for the division of this value with a certain divisor.- Since:
- 3.1.0
- Author:
- Emil Forslund
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ToDouble<T>divide(double divisor)Creates and returns an expression that returns the quotient of the result from the current expression and the divisor.ToDouble<T>divide(int divisor)Creates and returns an expression that returns the quotient of the result from the current expression and the divisor.ToDouble<T>divide(long divisor)Creates and returns an expression that returns the quotient of the result from the current expression and the divisor.ToDouble<T>divide(ToDouble<T> divisor)Creates and returns an expression that returns the quotient of the result from the current expression and the divisor.ToDouble<T>divide(ToInt<T> divisor)Creates and returns an expression that returns the quotient of the result from the current expression and the divisor.ToDouble<T>divide(ToLong<T> divisor)Creates and returns an expression that returns the quotient of the result from the current expression and the divisor.
-
-
-
Method Detail
-
divide
ToDouble<T> divide(int divisor)
Creates and returns an expression that returns the quotient of the result from the current expression and the divisor. For an example, if the result of the current expression was9and the divisor was set to3, then the result of the returned expression would be3.If this expression is nullable and the result was
null, then the result of the returned expression will also benull.- Parameters:
divisor- the divisor used for the division- Returns:
- the new expression
-
divide
ToDouble<T> divide(ToInt<T> divisor)
Creates and returns an expression that returns the quotient of the result from the current expression and the divisor. For an example, if the result of the current expression was9and the divisor was set to3, then the result of the returned expression would be3.If this expression is nullable and the result was
null, then the result of the returned expression will also benull.- Parameters:
divisor- the divisor used for the division- Returns:
- the new expression
-
divide
ToDouble<T> divide(long divisor)
Creates and returns an expression that returns the quotient of the result from the current expression and the divisor. For an example, if the result of the current expression was9and the divisor was set to3, then the result of the returned expression would be3.If this expression is nullable and the result was
null, then the result of the returned expression will also benull.- Parameters:
divisor- the divisor used for the division- Returns:
- the new expression
-
divide
ToDouble<T> divide(ToLong<T> divisor)
Creates and returns an expression that returns the quotient of the result from the current expression and the divisor. For an example, if the result of the current expression was9and the divisor was set to3, then the result of the returned expression would be3.If this expression is nullable and the result was
null, then the result of the returned expression will also benull.- Parameters:
divisor- the divisor used for the division- Returns:
- the new expression
-
divide
ToDouble<T> divide(double divisor)
Creates and returns an expression that returns the quotient of the result from the current expression and the divisor. For an example, if the result of the current expression was9and the divisor was set to3, then the result of the returned expression would be3.If this expression is nullable and the result was
null, then the result of the returned expression will also benull.- Parameters:
divisor- the divisor used for the division- Returns:
- the new expression
-
divide
ToDouble<T> divide(ToDouble<T> divisor)
Creates and returns an expression that returns the quotient of the result from the current expression and the divisor. For an example, if the result of the current expression was9and the divisor was set to3, then the result of the returned expression would be3.If this expression is nullable and the result was
null, then the result of the returned expression will also benull.- Parameters:
divisor- the divisor used for the division- Returns:
- the new expression
-
-