package com.tutego.insel.util;

import java.util.*;

class Club
{
  int qm;

  public Club( int qm )
  {
    this.qm = qm;
  }
}

class ClubComparator implements Comparator<Club>
{
  public int compare( Club c1, Club c2 )
  {
    return c1.qm - c2.qm;
  }
}

public class ClubComparatorDemo
{
  public static void main( String[] args )
  {
    Collection<Club> list = Arrays.asList(
                             new Club(100), new Club(1123), new Club(123) );

    Club club = Collections.max( list, new ClubComparator() );
    System.out.println( club.qm );      // 1123
  }
}