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

net.sf.jagg.msd.AbstractDiscriminator Maven / Gradle / Ivy

Go to download

jAgg is a Java 5.0 API that supports “group by” operations on Lists of Java objects: aggregate operations such as count, sum, max, min, avg, and many more. It also allows custom aggregate operations.

The newest version!
package net.sf.jagg.msd;

import java.util.List;

/**
 * An AbstractDiscriminator is an abstract
 * Discriminator that implements the discriminate
 * method that doesn't take an Extractor by calling the
 * discriminate method that does take an Extractor
 * and supplying a SelfExtractor.
 * The other discriminate method that does take an
 * Extractor is left unimplemented.
 *
 * @author Randy Gettman
 * @since 0.5.0
 * @see SelfExtractor
 */
public abstract class AbstractDiscriminator implements Discriminator
{
   /**
    * Defers to the discriminate method that takes an
    * Extractor by supplying it a SelfExtractor.
    * @param elements A List of elements.
    * @param workspace The MsdWorkspace used in the discrimination process.
    * @return A List of Lists containing all
    *    equivalence classes.  Each equivalence class list contains all
    *    elements that compare equal to each other.
    */
   public List> discriminate(List elements, MsdWorkspace workspace)
   {
      return discriminate(elements, new SelfExtractor(), workspace);
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy