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

com.tinkerpop.gremlin.util.function.SQuintConsumer Maven / Gradle / Ivy

package com.tinkerpop.gremlin.util.function;

import java.io.Serializable;
import java.util.Objects;

/**
 * Represents an operation that accepts two input arguments and returns no result. This is the quad-arity
 * specialization of {@link java.util.function.Consumer}. Unlike most other functional interfaces,
 * {@link SQuintConsumer} is expected to operate via side-effects.
 * 

* This is a functional interface whose functional method is {@link #accept(Object, Object, Object, Object, Object)}. * * @param the type of the first argument to the operation * @param the type of the second argument to the operation * @param the type of the third argument to the operation * @param the type of the fourth argument to the operation * @param the type of the fifth argument to the operation * @author Stephen Mallette (http://stephen.genoprime.com) */ public interface SQuintConsumer extends Serializable { /** * Performs this operation on the given arguments. * * @param a the first argument to the operation * @param b the second argument to the operation * @param c the third argument to the operation * @param d the fourth argument to the operation * @param e the fifth argument to the operation */ public void accept(final A a, final B b, final C c, final D d, final E e); /** * Returns a composed @{link QuintConsumer} that performs, in sequence, this operation followed by the {@code after} * operation. If performing either operation throws an exception, it is relayed to the caller of the composed * operation. If performing this operation throws an exception, the after operation will not be performed. * * @param after the operation to perform after this operation * @return a composed {@link SQuintConsumer} that performs in sequence this * operation followed by the {@code after} operation * @throws NullPointerException if {@code after} is null */ public default SQuintConsumer andThen(final SQuintConsumer after) { Objects.requireNonNull(after); return (A a, B b, C c, D d, E e) -> { accept(a, b, c, d, e); after.accept(a, b, c, d, e); }; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy