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

com.couchbase.lite.Reducer Maven / Gradle / Ivy

There is a newer version: 1.4.4
Show newest version
package com.couchbase.lite;

import java.util.List;

/**
 * Block container for the reduce callback function
 */
public interface Reducer {

    /**
     * A "reduce" function called to summarize the results of a view.
     *
     * @param keys An array of keys to be reduced (or null if this is a rereduce).
     * @param values A parallel array of values to be reduced, corresponding 1::1 with the keys.
     * @param rereduce true if the input values are the results of previous reductions.
     * @return The reduced value; almost always a scalar or small fixed-size object.
     */
    Object reduce(List keys, List values, boolean rereduce);

}