CORE API / NOTES</>↗Core API18 Mar 2025
The Supplier functional interface in Java is part of the java.util.function package and is used when we need to supply or produce a result without taking any input. It is a functional interface, meaning it can be represented as a lambda expression or method reference. The Supplier interface has a single abstract method: T get(); […]
CORE API / NOTES</>↗Core API17 Mar 2025
The ObjLongConsumer functional interface in Java is part of the java.util.function package and is available since Java 8. It represents an operation that accepts two input arguments: an object T and a long-valued argument, and performs some operation without returning any result. It is effectively a BiConsumer specialized for one object and one long argument. […]
CORE API / NOTES</>↗Core API17 Mar 2025
The ObjIntConsumer is a functional interface in Java, introduced in Java 8, as part of the java.util.function package. It represents an operation that takes an object (T) and an int as input arguments and returns no result. It’s essentially a BiConsumer that specifically takes an int as one of the parameters. Here is a breakdown […]
CORE API / NOTES</>↗Core API17 Mar 2025
In Java, the ObjDoubleConsumer is part of the java.util.function package, and it represents a functional interface. It takes two arguments: An object of type T A double-valued argument The functional method of this interface is accept(T t, double value), which performs an operation that accepts these two parameters but does not return any result (void). […]
CORE API / NOTES</>↗Core API16 Mar 2025
Key Features of LongUnaryOperator It performs operations on long values. It has a single abstract method: long applyAsLong(long operand), which takes one long argument and returns a long result. Additional default and static methods such as andThen() and compose() allow chaining of operations. Key Methods in LongUnaryOperator long applyAsLong(long operand) Performs the operation and returns […]
CORE API / NOTES</>↗Core API15 Mar 2025
The LongToIntFunction is a functional interface in Java located in the java.util.function package. It represents a function that accepts a long-valued argument and produces an int-valued result. It is a specialized form of functional interface primarily used to avoid boxing when working with primitive types. Here is a guide on how to use the LongToIntFunction […]