Interface HasSign<E>
-
- Type Parameters:
E- the expression type returned by thesign()method
- All Known Subinterfaces:
ToBigDecimal<T>,ToBigDecimalOrElse<T>,ToBigDecimalOrElseGet<T>,ToBigDecimalOrThrow<T>,ToByte<T>,ToByteNullable<T>,ToByteOrElse<T>,ToByteOrElseGet<T>,ToByteOrThrow<T>,ToDouble<T>,ToDoubleNullable<T>,ToDoubleOrElse<T>,ToDoubleOrElseGet<T>,ToDoubleOrThrow<T>,ToFloat<T>,ToFloatNullable<T>,ToFloatOrElse<T>,ToFloatOrElseGet<T>,ToFloatOrThrow<T>,ToInt<T>,ToIntNullable<T>,ToIntOrElse<T>,ToIntOrElseGet<T>,ToIntOrThrow<T>,ToLong<T>,ToLongNullable<T>,ToLongOrElse<T>,ToLongOrElseGet<T>,ToLongOrThrow<T>,ToShort<T>,ToShortNullable<T>,ToShortOrElse<T>,ToShortOrElseGet<T>,ToShortOrThrow<T>
public interface HasSign<E>Trait for expressions that has asign()method for getting the sign (positive, negative or zero) of the result from the current expression.- Since:
- 3.1.0
- Author:
- Emil Forslund
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Esign()Creates and returns an expression that returns1if the result of the this expression is positive,-1if the result of this expression is negative and0if the result of this expression is0.
-
-
-
Method Detail
-
sign
E sign()
Creates and returns an expression that returns1if the result of the this expression is positive,-1if the result of this expression is negative and0if the result of this expression is0.If this expression is nullable and the result was
null, then the result of the returned expression will also benull.- Returns:
- the new expression
-
-