FindBugs™ 1.3.9

edu.umd.cs.findbugs.gui
Class Grouper<ElementType>

java.lang.Object
  extended by edu.umd.cs.findbugs.gui.Grouper<ElementType>

public class Grouper<ElementType>
extends java.lang.Object

Given a sorted Collection and a Comparator, produces groups of objects that compare as equal. If the Collection is not sorted, this class will not work correctly.

Author:
David Hovemeyer

Nested Class Summary
static interface Grouper.Callback<ElementType2>
           
 
Constructor Summary
Grouper(Grouper.Callback<ElementType> callback)
          Creates a new instance of Grouper.
 
Method Summary
 void group(java.util.Collection<ElementType> collection, java.util.Comparator<ElementType> comparator)
          Group elements of given collection according to given compartor's test for equality.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grouper

public Grouper(Grouper.Callback<ElementType> callback)
Creates a new instance of Grouper.

Parameters:
callback - the callback which receives the groups and elements
Method Detail

group

public void group(java.util.Collection<ElementType> collection,
                  java.util.Comparator<ElementType> comparator)
Group elements of given collection according to given compartor's test for equality. The groups are specified by calls to the Grouper's callback object.

Parameters:
collection - the collection
comparator - the comparator

FindBugs™ 1.3.9

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.