package com.github.aldurd392.bigdatacontest.datatypes;

import java.util.Comparator;
import java.util.Map;

import org.apache.hadoop.io.IntWritable;

public class IntegerValueComparator implements Comparator<IntWritable> {

    Map<IntWritable, Integer> base;

    public IntegerValueComparator(Map<IntWritable, Integer> base) {
        this.base = base;
    }

    @Override
    public int compare(IntWritable o1, IntWritable o2) {
        if (base.get(o1) >= base.get(o2)) {
            return 1;
        } else {
            return -1;
        } // returning 0 would merge keys
    }

}

@@ -48,32 +48,74 @@
 atypes;%0A%0Aimport 
+org.apache.hadoop.io.IntWritable;%0A%0Aimport 
 java.util.Compar
@@ -144,50 +144,8 @@
 .Map
-;%0A%0Aimport org.apache.hadoop.io.IntWritable
 ;%0A%0Ap
@@ -221,16 +221,30 @@
  %7B%0A%0A    
+private final 
 Map%3CIntW

make IntegerValueComparator fields private