T - type to extract from@FunctionalInterface public interface ToByte<T> extends Expression<T>, com.speedment.common.function.ToByteFunction<T>, HasAsDouble<T>, HasAsInt<T>, HasAsLong<T>, HasAbs<ToByte<T>>, HasSign<ToByte<T>>, HasSqrt<ToDouble<T>>, HasNegate<ToByte<T>>, HasPow<T>, HasPlus<T>, HasMinus<T>, HasMultiply<T>, HasDivide<T>, HasMap<T,com.speedment.common.function.ByteUnaryOperator,ToByte<T>>, HasMapToDouble<T,com.speedment.common.function.ByteToDoubleFunction>, HasHash<T>, HasCompare<T>, HasCompose<T>
byte 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.ToByteFunction| Modifier and Type | Method and Description |
|---|---|
default ToByte<T> |
abs()
Returns a new expression that returns the absolute value of the result
of the current expression.
|
byte |
applyAsByte(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> ToByteNullable<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 64-bit hash.
|
default ToByte<T> |
map(com.speedment.common.function.ByteUnaryOperator operator)
Returns an expression for the value of this expression mapped using the
specified mapping function.
|
default ToDouble<T> |
mapToDouble(com.speedment.common.function.ByteToDoubleFunction 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 ToShort<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 ToShort<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 ToByte<T> |
negate()
Returns a new expression that returns the absolute value of the result
of the current expression.
|
static <T> ToByte<T> |
of(com.speedment.common.function.ToByteFunction<T> lambda)
Returns a typed
ToByte<T> using the provided lambda. |
default ToShort<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 ToShort<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, thenComparingLongstatic <T> ToByte<T> of(com.speedment.common.function.ToByteFunction<T> lambda)
ToByte<T> using the provided lambda.T - type to extract fromlambda - to convertToByte<T> using the provided lambdaNullPointerException - if the provided lambda is
nullbyte applyAsByte(T object)
com.speedment.common.function.ToByteFunctionapplyAsByte in interface com.speedment.common.function.ToByteFunction<T>object - the argumentdefault ExpressionType expressionType()
ExpressionexpressionType in interface Expression<T>default ToDouble<T> asDouble()
HasAsDoubledouble.asDouble in interface HasAsDouble<T>default ToInt<T> asInt()
HasAsIntint.default ToLong<T> asLong()
HasAsLonglong.default ToDouble<T> mapToDouble(com.speedment.common.function.ByteToDoubleFunction operator)
HasMapToDoubledouble by passing it to
the specified mapper, producing a new expression that implements
ToDouble.mapToDouble in interface HasMapToDouble<T,com.speedment.common.function.ByteToDoubleFunction>operator - the mapper to use on the result of this expressiondefault ToByte<T> map(com.speedment.common.function.ByteUnaryOperator operator)
HasMapdefault ToByte<T> abs()
HasAbsdefault ToByte<T> sign()
HasSign1 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 ToShort<T> plus(byte other)
HasPlus9 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 ToShort<T> plus(ToByte<T> other)
HasPlus9 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)
HasPlus9 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)
HasPlus9 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)
HasPlus9 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)
HasPlus9 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)
HasPlus9 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)
HasPlus9 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 ToShort<T> minus(byte other)
HasMinus9 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 ToShort<T> minus(ToByte<T> other)
HasMinus9 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)
HasMinus9 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)
HasMinus9 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)
HasMinus9 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)
HasMinus9 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)
HasMinus9 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)
HasMinus9 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)
HasMultiply9 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)
HasMultiply9 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)
HasMultiply9 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)
HasMultiply9 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)
HasMultiply9 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)
HasMultiply9 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)
HasMultiply9 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)
HasMultiply9 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)
HasDivide9 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)
HasDivide9 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)
HasDivide9 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)
HasDivide9 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)
HasDivide9 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)
HasDivide9 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 ToByte<T> negate()
HasNegatedefault long hash(T object)
HasHashdefault int compare(T first, T second)
compare in interface Comparator<T>compare in interface HasCompare<T>default <V> ToByteNullable<V> compose(Function<? super V,? extends T> before)
HasComposebefore
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 © 2019 Speedment, Inc.. All rights reserved.