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

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

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

import java.util.Objects;

/**
 * Byte unary operator.
 */
@FunctionalInterface
public interface ByteOperator
    extends ByteToObject, ObjectToByte
{
    /**
     * Apply the operator.
     *
     * @param value Original value.
     * @return Result value.
     */
    byte apply(byte value);

    @Override
    default Byte toObject(byte value)
    {
        return apply(value);
    }

    @Override
    default byte toByte(Byte value)
    {
        Objects.requireNonNull(value, "null_value");

        return apply(value);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy