T
 type to extract from@FunctionalInterface public interface ToShort<T> extends Expression<T>, com.speedment.common.function.ToShortFunction<T>, HasAsDouble<T>, HasAsInt<T>, HasAsLong<T>, HasAbs<ToShort<T>>, HasSign<ToByte<T>>, HasSqrt<ToDouble<T>>, HasNegate<ToShort<T>>, HasPow<T>, HasPlus<T>, HasMinus<T>, HasMultiply<T>, HasDivide<T>, HasMap<T,com.speedment.common.function.ShortUnaryOperator,ToShort<T>>, HasMapToDouble<T,com.speedment.common.function.ShortToDoubleFunction>, HasHash<T>, HasCompare<T>, HasCompose<T>
short
value. This
expression can be implemented using a lambda, or it can be a result of
another operation. It has additional methods for operating on it.ToShortFunction
Modifier and Type  Method and Description 

default ToShort<T> 
abs()
Returns a new expression that returns the absolute value of the result
of the current expression.

short 
applyAsShort(T object)
Applies this function to the given argument.

default ToDouble<T> 
asDouble()
Returns an expression that casts the result of the current expression
into a
double . 
default ToInt<T> 
asInt()
Returns an expression that casts the result of the current expression
into an
int . 
default ToLong<T> 
asLong()
Returns an expression that casts the result of the current expression
into a
long . 
default int 
compare(T first,
T second) 
default <V> ToShortNullable<V> 
compose(Function<? super V,? extends T> before)
Returns a composed expression that first applies the
before
function to its input, and then applies this function to the result. 
default ToDouble<T> 
divide(double divisor)
Creates and returns an expression that returns the quotient of the result
from the current expression and the divisor.

default ToDouble<T> 
divide(int divisor)
Creates and returns an expression that returns the quotient of
the result from the current expression and the divisor.

default ToDouble<T> 
divide(long divisor)
Creates and returns an expression that returns the quotient of the result
from the current expression and the divisor.

default 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.

default 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.

default 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.

default ExpressionType 
expressionType()
Returns the expression type of this expression.

default long 
hash(T object)
Hash the specified object into a 64bit hash.

default ToShort<T> 
map(com.speedment.common.function.ShortUnaryOperator operator)
Returns an expression for the value of this expression mapped using the
specified mapping function.

default ToDouble<T> 
mapToDouble(com.speedment.common.function.ShortToDoubleFunction operator)
Maps the result of this expression into a
double by passing it to
the specified mapper , producing a new expression that implements
ToDouble . 
default ToInt<T> 
minus(byte other)
Creates and returns an expression that returns the difference of the
result from the current expression and the other term.

default ToDouble<T> 
minus(double other)
Creates and returns an expression that returns the difference of the
result from the current expression and the other term.

default ToInt<T> 
minus(int other)
Creates and returns an expression that returns the difference of the
result from the current expression and the other term.

default ToLong<T> 
minus(long other)
Creates and returns an expression that returns the difference of the
result from the current expression and the other term.

default ToInt<T> 
minus(ToByte<T> other)
Creates and returns an expression that returns the difference of the
result from the current expression and the other term.

default ToDouble<T> 
minus(ToDouble<T> other)
Creates and returns an expression that returns the difference of the
result from the current expression and the other term.

default ToInt<T> 
minus(ToInt<T> other)
Creates and returns an expression that returns the difference of the
result from the current expression and the other term.

default ToLong<T> 
minus(ToLong<T> other)
Creates and returns an expression that returns the difference of the
result from the current expression and the other term.

default ToInt<T> 
multiply(byte other)
Creates and returns an expression that returns the product of the result
from the current expression and the other factor.

default ToDouble<T> 
multiply(double other)
Creates and returns an expression that returns the product of the result
from the current expression and the other factor.

default ToInt<T> 
multiply(int other)
Creates and returns an expression that returns the product of the result
from the current expression and the other factor.

default ToLong<T> 
multiply(long other)
Creates and returns an expression that returns the product of the result
from the current expression and the other factor.

default ToInt<T> 
multiply(ToByte<T> other)
Creates and returns an expression that returns the product of the result
from the current expression and the other factor.

default ToDouble<T> 
multiply(ToDouble<T> other)
Creates and returns an expression that returns the product of the result
from the current expression and the other factor.

default ToInt<T> 
multiply(ToInt<T> other)
Creates and returns an expression that returns the product of the result
from the current expression and the other factor.

default ToLong<T> 
multiply(ToLong<T> other)
Creates and returns an expression that returns the product of the result
from the current expression and the other factor.

default ToShort<T> 
negate()
Returns a new expression that returns the absolute value of the result
of the current expression.

static <T> ToShort<T> 
of(com.speedment.common.function.ToShortFunction<T> lambda)
Returns a typed
ToShort<T> using the provided lambda . 
default ToInt<T> 
plus(byte other)
Creates and returns an expression that returns the sum of the result from
the current expression and the other term.

default ToDouble<T> 
plus(double other)
Creates and returns an expression that returns the sum of the result from
the current expression and the other term.

default ToInt<T> 
plus(int other)
Creates and returns an expression that returns the sum of the result from
the current expression and the other term.

default ToLong<T> 
plus(long other)
Creates and returns an expression that returns the sum of the result from
the current expression and the other term.

default ToInt<T> 
plus(ToByte<T> other)
Creates and returns an expression that returns the sum of the result from
the current expression and the other term.

default ToDouble<T> 
plus(ToDouble<T> other)
Creates and returns an expression that returns the sum of the result from
the current expression and the other term.

default ToInt<T> 
plus(ToInt<T> other)
Creates and returns an expression that returns the sum of the result from
the current expression and the other term.

default ToLong<T> 
plus(ToLong<T> other)
Creates and returns an expression that returns the sum of the result from
the current expression and the other term.

default ToDouble<T> 
pow(double power)
Creates and returns an expression that returns the exponential power of
the result from the current expression.

default ToDouble<T> 
pow(int power)
Creates and returns an expression that returns the exponential power of
the result from the current expression.

default ToDouble<T> 
pow(ToDouble<T> power)
Creates and returns an expression that returns the exponential power of
the result from the current expression.

default ToDouble<T> 
pow(ToInt<T> power)
Creates and returns an expression that returns the exponential power of
the result from the current expression.

default ToByte<T> 
sign()
Creates and returns an expression that returns
1 if the result of
the this expression is positive, 1 if the result of this
expression is negative and 0 if the result of this expression is
0 . 
default ToDouble<T> 
sqrt()
Creates and returns an expression that returns the square root of the
result from the current expression.

comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
static <T> ToShort<T> of(com.speedment.common.function.ToShortFunction<T> lambda)
ToShort<T>
using the provided lambda
.T
 type to extract fromlambda
 to convertToShort<T>
using the provided lambda
NullPointerException
 if the provided lambda
is
null
short applyAsShort(T object)
com.speedment.common.function.ToShortFunction
applyAsShort
in interface com.speedment.common.function.ToShortFunction<T>
object
 the argumentdefault ExpressionType expressionType()
Expression
expressionType
in interface Expression<T>
default ToDouble<T> asDouble()
HasAsDouble
double
.asDouble
in interface HasAsDouble<T>
default ToInt<T> asInt()
HasAsInt
int
.default ToLong<T> asLong()
HasAsLong
long
.default ToDouble<T> mapToDouble(com.speedment.common.function.ShortToDoubleFunction operator)
HasMapToDouble
double
by passing it to
the specified mapper
, producing a new expression that implements
ToDouble
.mapToDouble
in interface HasMapToDouble<T,com.speedment.common.function.ShortToDoubleFunction>
operator
 the mapper to use on the result of this expressiondefault ToShort<T> map(com.speedment.common.function.ShortUnaryOperator operator)
HasMap
default ToShort<T> abs()
HasAbs
default ToByte<T> sign()
HasSign
1
if the result of
the this expression is positive, 1
if the result of this
expression is negative and 0
if the result of this expression is
0
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> sqrt()
HasSqrt
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> pow(int power)
HasPow
3
and the power was set to 2
,
then the result of the returned expression would be 9
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> pow(double power)
HasPow
3
and the power was set to 2
,
then the result of the returned expression would be 9
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> pow(ToInt<T> power)
HasPow
3
and the power was set to 2
,
then the result of the returned expression would be 9
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> pow(ToDouble<T> power)
HasPow
3
and the power was set to 2
,
then the result of the returned expression would be 9
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToInt<T> plus(byte other)
HasPlus
9
and the other term was set to
3
, then the result of the returned expression would be 12
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToInt<T> plus(ToByte<T> other)
HasPlus
9
and the other term was set to
3
, then the result of the returned expression would be 12
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToInt<T> plus(int other)
HasPlus
9
and the other term was set to
3
, then the result of the returned expression would be 12
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToInt<T> plus(ToInt<T> other)
HasPlus
9
and the other term was set to
3
, then the result of the returned expression would be 12
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToLong<T> plus(long other)
HasPlus
9
and the other term was set to
3
, then the result of the returned expression would be 12
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToLong<T> plus(ToLong<T> other)
HasPlus
9
and the other term was set to
3
, then the result of the returned expression would be 12
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> plus(double other)
HasPlus
9
and the other term was set to
3
, then the result of the returned expression would be 12
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> plus(ToDouble<T> other)
HasPlus
9
and the other term was set to
3
, then the result of the returned expression would be 12
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToInt<T> minus(byte other)
HasMinus
9
and the other term was
set to 3
, then the result of the returned expression would be
6
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToInt<T> minus(ToByte<T> other)
HasMinus
9
and the other term was
set to 3
, then the result of the returned expression would be
6
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToInt<T> minus(int other)
HasMinus
9
and the other term was
set to 3
, then the result of the returned expression would be
6
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToInt<T> minus(ToInt<T> other)
HasMinus
9
and the other term was
set to 3
, then the result of the returned expression would be
6
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToLong<T> minus(long other)
HasMinus
9
and the other term was
set to 3
, then the result of the returned expression would be
6
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToLong<T> minus(ToLong<T> other)
HasMinus
9
and the other term was
set to 3
, then the result of the returned expression would be
6
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> minus(double other)
HasMinus
9
and the other term was
set to 3
, then the result of the returned expression would be
6
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> minus(ToDouble<T> other)
HasMinus
9
and the other term was
set to 3
, then the result of the returned expression would be
6
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToInt<T> multiply(byte other)
HasMultiply
9
and the factor was set to
3
, then the result of the returned expression would be 27
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
multiply
in interface HasMultiply<T>
other
 the other factor used for the multiplicationdefault ToInt<T> multiply(ToByte<T> other)
HasMultiply
9
and the factor was set to
3
, then the result of the returned expression would be 27
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
multiply
in interface HasMultiply<T>
other
 the other factor used for the multiplicationdefault ToInt<T> multiply(int other)
HasMultiply
9
and the factor was set to
3
, then the result of the returned expression would be 27
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
multiply
in interface HasMultiply<T>
other
 the other factor used for the multiplicationdefault ToInt<T> multiply(ToInt<T> other)
HasMultiply
9
and the factor was set to
3
, then the result of the returned expression would be 27
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
multiply
in interface HasMultiply<T>
other
 the other factor used for the multiplicationdefault ToLong<T> multiply(long other)
HasMultiply
9
and the factor was set to
3
, then the result of the returned expression would be 27
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
multiply
in interface HasMultiply<T>
other
 the other factor used for the multiplicationdefault ToLong<T> multiply(ToLong<T> other)
HasMultiply
9
and the factor was set to
3
, then the result of the returned expression would be 27
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
multiply
in interface HasMultiply<T>
other
 the other factor used for the multiplicationdefault ToDouble<T> multiply(double other)
HasMultiply
9
and the factor was set to
3
, then the result of the returned expression would be 27
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
multiply
in interface HasMultiply<T>
other
 the other factor used for the multiplicationdefault ToDouble<T> multiply(ToDouble<T> other)
HasMultiply
9
and the factor was set to
3
, then the result of the returned expression would be 27
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
multiply
in interface HasMultiply<T>
other
 the other factor used for the multiplicationdefault ToDouble<T> divide(int divisor)
HasDivide
9
and the divisor was set to 3
,
then the result of the returned expression would be 3
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> divide(ToInt<T> divisor)
HasDivide
9
and the divisor was set to
3
, then the result of the returned expression would be 3
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> divide(long divisor)
HasDivide
9
and the divisor was set to
3
, then the result of the returned expression would be 3
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> divide(ToLong<T> divisor)
HasDivide
9
and the divisor was set to
3
, then the result of the returned expression would be 3
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> divide(double divisor)
HasDivide
9
and the divisor was set to
3
, then the result of the returned expression would be 3
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToDouble<T> divide(ToDouble<T> divisor)
HasDivide
9
and the divisor was set to
3
, then the result of the returned expression would be 3
.
If this expression is nullable and the result was null
, then the
result of the returned expression will also be null
.
default ToShort<T> negate()
HasNegate
default long hash(T object)
HasHash
default int compare(T first, T second)
compare
in interface Comparator<T>
compare
in interface HasCompare<T>
default <V> ToShortNullable<V> compose(Function<? super V,? extends T> before)
HasCompose
before
function to its input, and then applies this function to the result.
If evaluation of either function throws an exception, it is relayed to
the caller of the composed function.compose
in interface HasCompose<T>
V
 the type of input to the before
function, and to the
composed expressionbefore
 the function to apply before this function is appliedbefore
function and then applies this functionCopyright © 2018 Speedment, Inc.. All rights reserved.