medisyn
Class ProxyGroup.GroupSizeComparer

java.lang.Object
  extended by medisyn.ProxyGroup.GroupSizeComparer
All Implemented Interfaces:
java.util.Comparator<ProxyGroup>
Enclosing class:
ProxyGroup

public static class ProxyGroup.GroupSizeComparer
extends java.lang.Object
implements java.util.Comparator<ProxyGroup>

This class implements a Comparator for ProxyGroups. They sizes of the two groups are compared. It creates a natural order of the sizes. This means that smaller groups come first.

Author:
Leo Bosnjak

Constructor Summary
ProxyGroup.GroupSizeComparer()
           
 
Method Summary
 int compare(ProxyGroup group1, ProxyGroup group2)
          Compares the sizes of the two groups.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

ProxyGroup.GroupSizeComparer

public ProxyGroup.GroupSizeComparer()
Method Detail

compare

public int compare(ProxyGroup group1,
                   ProxyGroup group2)
Compares the sizes of the two groups. The greater the size, the greater the return val.

Specified by:
compare in interface java.util.Comparator<ProxyGroup>