package sort;
/** Combines two Buckets' together. Used with scans or
* reductions.
*/
public class BucketsCombiner implements ObjectOp {
/** Combines two Buckets' together, the first mutated
* to the result.
* @param o1 the first Buckets (mutated)
* @param o2 the second Buckets (not mutated)
* @return the resulting combined Buckets, pointer
* equal to the first parameter
*/
public Object eval(Object o1, Object o2) {
Buckets b1 = (Buckets) o1;
Buckets b2 = (Buckets) o2;
b1.combine(b2);
return b1;
}
}