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

com.aerospike.jdbc.predicate.OperatorUnary Maven / Gradle / Ivy

There is a newer version: 1.9.2
Show newest version
package com.aerospike.jdbc.predicate;

import com.aerospike.client.exp.Exp;
import com.google.common.base.Preconditions;

import java.util.function.UnaryOperator;

public enum OperatorUnary implements Operator {

    NOT(Exp::not);

    private final UnaryOperator func;

    OperatorUnary(UnaryOperator expFunc) {
        this.func = expFunc;
    }

    @Override
    public Exp exp(Exp... expressions) {
        Preconditions.checkArgument(expressions.length == 1);
        return func.apply(expressions[0]);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy