All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.argento.jfunction.LongOperator Maven / Gradle / Ivy

There is a newer version: 1.0
Show newest version
package ru.argento.jfunction;

import java.util.Objects;

/**
 * Long integer unary operator.
 */
@FunctionalInterface
public interface LongOperator
    extends LongToObject, ObjectToLong
{
    /**
     * Apply the operator.
     *
     * @param value Original value.
     * @return Result value.
     */
    long apply(long value);

    @Override
    default Long toObject(long value)
    {
        return apply(value);
    }

    @Override
    default long toLong(Long value)
    {
        Objects.requireNonNull(value, "null_value");

        return apply(value);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy