Package zone.lamprey.function
Interface LongBinaryOperator
- All Superinterfaces:
BiFunction<Long,Long,Long>,BiFunction<Long,Long,Long>,BinaryOperator<Long>,BinaryOperator<Long>,LongBinaryOperator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface LongBinaryOperator extends BinaryOperator<Long>, LongBinaryOperator
Represents an operation upon two
long-valued operands and producing a
long-valued result. This is the primitive type specialization of
BinaryOperator for long.
This is a functional interface whose
functional method is applyAsLong(long, long).
- Since:
- 1.8
- See Also:
BinaryOperator,LongUnaryOperator
-
Field Summary
Fields Modifier and Type Field Description static LongBinaryOperatorADDFunctional version of a long operator.static LongBinaryOperatorDIVIDEFunctional version of a long operator.static LongBinaryOperatorMODFunctional version of a long operator.static LongBinaryOperatorMULTIPLYFunctional version of a long operator.static LongBinaryOperatorSUBTRACTFunctional version of a long operator. -
Method Summary
Modifier and Type Method Description default Longapply(Long t, Long u)Applies this function to the given arguments.longapplyAsLong(long left, long right)Applies this operator to the given operands.default LongSupplierapplyPartial(long t, long u)Performs a partial application, resulting in a function that calls this with its argument and the argument given here.default LongUnaryOperatorapplyPartialL(long t)Performs a partial application, resulting in a function that calls this with its argument and the argument given here.default LongUnaryOperatorapplyPartialR(long u)Performs a partial application, resulting in a function that calls this with its argument and the argument given here.default ObjLongConsumer<Long>consume(LongConsumer consumer)Consume a function.default LongBinaryOperatormap(LongUnaryOperator functor)Lift a function.Methods inherited from interface zone.lamprey.function.BiFunction
applyPartial, consume, map, mapToDouble, mapToInt, mapToLong, predicateMethods inherited from interface zone.lamprey.function.BinaryOperator
applyPartialL, applyPartialR, map
-
Field Details
-
Method Details
-
applyAsLong
long applyAsLong(long left, long right)Applies this operator to the given operands.- Specified by:
applyAsLongin interfaceLongBinaryOperator- Parameters:
left- the first operandright- the second operand- Returns:
- the operator result
-
apply
Applies this function to the given arguments.- Specified by:
applyin interfaceBiFunction<Long,Long,Long>- Specified by:
applyin interfaceBiFunction<Long,Long,Long>- Parameters:
t- the first function argumentu- the second function argument- Returns:
- the function result
-
applyPartial
Performs a partial application, resulting in a function that calls this with its argument and the argument given here.- Parameters:
t- the first function argumentu- the second function argument- Returns:
- the function result
-
applyPartialL
Performs a partial application, resulting in a function that calls this with its argument and the argument given here.- Parameters:
t- the function argument- Returns:
- the function result
-
applyPartialR
Performs a partial application, resulting in a function that calls this with its argument and the argument given here.- Parameters:
u- the function argument- Returns:
- the function result
-
consume
Consume a function.- Parameters:
consumer- The consumer to use in consuming.- Returns:
- A Consumer which passes it's argument to this function and then passes the result into the given consumer.
-
map
Lift a function.- Parameters:
functor- The function to use in lifting.- Returns:
- A function that passes the result of fn through a functor to produce a lifted function.
-