net.sf.jagg.msd
Class BooleanDiscriminator

java.lang.Object
  extended by net.sf.jagg.msd.AbstractDiscriminator<java.lang.Boolean>
      extended by net.sf.jagg.msd.BooleanDiscriminator
All Implemented Interfaces:
Discriminator<java.lang.Boolean>

public class BooleanDiscriminator
extends AbstractDiscriminator<java.lang.Boolean>

A BooleanDiscriminator discriminates Lists of Booleans.

Since:
0.5.0
Author:
Randy Gettman

Constructor Summary
BooleanDiscriminator()
           
 
Method Summary
<E> java.util.List<java.util.List<E>>
discriminate(java.util.List<E> elements, Extractor<E,java.lang.Boolean> extractor, MsdWorkspace workspace)
          Partitions the given List of values into another List, in which all of the values from the given list exist in the new list, and all values that compare equal are adjacent to each other, according to the given Extractor.
 
Methods inherited from class net.sf.jagg.msd.AbstractDiscriminator
discriminate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanDiscriminator

public BooleanDiscriminator()
Method Detail

discriminate

public <E> java.util.List<java.util.List<E>> discriminate(java.util.List<E> elements,
                                                          Extractor<E,java.lang.Boolean> extractor,
                                                          MsdWorkspace workspace)
Partitions the given List of values into another List, in which all of the values from the given list exist in the new list, and all values that compare equal are adjacent to each other, according to the given Extractor.

Type Parameters:
E - The type of element that is being discriminated by the type <E>
Parameters:
elements - A List of elements.
extractor - An Extractor that gives labels for each element.
workspace - The MsdWorkspace used in the discrimination process.
Returns:
A List of Lists containing all equivalence classes. Each equivalence class list contains all values that compare equal to each other.


Copyright © 2010-2013 jAgg Team. All Rights Reserved.