package org.eclipse.collections.impl.block.factory;
import org.eclipse.collections.api.block.procedure.Procedure;
import org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure;
public final class ObjectIntProcedures
{
private ObjectIntProcedures()
{
throw new AssertionError("Suppress default constructor for noninstantiability");
}
public static <T> ObjectIntProcedure<T> fromProcedure(Procedure<? super T> procedure)
{
return new ProcedureAdapter<>(procedure);
}
private static final class ProcedureAdapter<T> implements ObjectIntProcedure<T>
{
private static final long serialVersionUID = 1L;
private final Procedure<? super T> procedure;
private ProcedureAdapter(Procedure<? super T> procedure)
{
this.procedure = procedure;
}
@Override
public void value(T each, int count)
{
this.procedure.value(each);
}
}
}