@Override public IntComparator duplicate() { return new IntComparator(ascendingComparison); } }
public IntPrimitiveArrayComparator(boolean ascending) { super(ascending, new IntComparator(ascending)); }
@Override protected TypeComparator<Integer> createComparator(boolean ascending) { return new IntComparator(ascending); }
@Override protected TupleComparator<Tuple3<Integer, String, Double>> createComparator(boolean ascending) { return new TupleComparator<Tuple3<Integer, String, Double>>( new int[]{0}, new TypeComparator[]{ new IntComparator(ascending) }, new TypeSerializer[]{ IntSerializer.INSTANCE }); }
@Override protected TupleComparator<Tuple3<Integer, String, Double>> createComparator(boolean ascending) { return new TupleComparator<Tuple3<Integer, String, Double>>( new int[]{0, 1}, new TypeComparator[]{ new IntComparator(ascending), new StringComparator(ascending) }, new TypeSerializer[]{ IntSerializer.INSTANCE, StringSerializer.INSTANCE, DoubleSerializer.INSTANCE }); }
@Override protected TupleComparator<Tuple3<Integer, Long, Double>> createComparator(boolean ascending) { return new TupleComparator<Tuple3<Integer, Long, Double>>( new int[]{0, 1}, new TypeComparator[]{ new IntComparator(ascending), new LongComparator(ascending) }, new TypeSerializer[]{ IntSerializer.INSTANCE, LongSerializer.INSTANCE }); }
@Override protected TupleComparator<Tuple3<Integer, String, Double>> createComparator(boolean ascending) { return new TupleComparator<Tuple3<Integer, String, Double>>( new int[]{0, 1, 2}, new TypeComparator[]{ new IntComparator(ascending), new StringComparator(ascending), new DoubleComparator(ascending) }, new TypeSerializer[]{ IntSerializer.INSTANCE, StringSerializer.INSTANCE, DoubleSerializer.INSTANCE }); }
@Override protected TupleComparator<Tuple3<Integer, Long, Double>> createComparator(boolean ascending) { return new TupleComparator<Tuple3<Integer, Long, Double>>( new int[]{2, 0, 1}, new TypeComparator[]{ new DoubleComparator(ascending), new IntComparator(ascending), new LongComparator(ascending) }, new TypeSerializer[]{ IntSerializer.INSTANCE, LongSerializer.INSTANCE, DoubleSerializer.INSTANCE }); }
@Override protected TupleComparator<Tuple3<Integer, Long, Double>> createComparator(boolean ascending) { return new TupleComparator<Tuple3<Integer, Long, Double>>( new int[]{0, 1, 2}, new TypeComparator[]{ new IntComparator(ascending), new LongComparator(ascending), new DoubleComparator(ascending) }, new TypeSerializer[]{ IntSerializer.INSTANCE, LongSerializer.INSTANCE, DoubleSerializer.INSTANCE }); }
@SuppressWarnings("rawtypes") @Override protected GenericPairComparator<Tuple3<Integer, String, Double>, Tuple4<Integer, Float, Long, Double>> createComparator(boolean ascending) { int[] fields1 = new int[]{0, 2}; int[] fields2 = new int[]{0, 3}; TypeComparator[] comps1 = new TypeComparator[]{ new IntComparator(ascending), new DoubleComparator(ascending) }; TypeComparator[] comps2 = new TypeComparator[]{ new IntComparator(ascending), new DoubleComparator(ascending) }; TypeSerializer[] sers1 = new TypeSerializer[]{ IntSerializer.INSTANCE, DoubleSerializer.INSTANCE }; TypeSerializer[] sers2= new TypeSerializer[]{ IntSerializer.INSTANCE, DoubleSerializer.INSTANCE }; TypeComparator<Tuple3<Integer, String, Double>> comp1 = new TupleComparator<Tuple3<Integer, String, Double>>(fields1, comps1, sers1); TypeComparator<Tuple4<Integer, Float, Long, Double>> comp2 = new TupleComparator<Tuple4<Integer, Float, Long, Double>>(fields2, comps2, sers2); return new GenericPairComparator<Tuple3<Integer, String, Double>, Tuple4<Integer, Float, Long, Double>>(comp1, comp2); }
new int[] { 0, 1 }, new TypeComparator[] { new IntComparator(ascending), new LongComparator(ascending) }, new TypeSerializer[] {
new int[] { 0, 1 }, new TypeComparator[] { new IntComparator(ascending), new LongComparator(ascending) }, new TypeSerializer[] {
@Override public IntComparator duplicate() { return new IntComparator(ascendingComparison); } }
@Override public IntComparator duplicate() { return new IntComparator(ascendingComparison); } }
public IntPrimitiveArrayComparator(boolean ascending) { super(ascending, new IntComparator(ascending)); }
public IntPrimitiveArrayComparator(boolean ascending) { super(ascending, new IntComparator(ascending)); }
sort(data, new IntComparator(){
TypeComparator<?>[] comparators = new TypeComparator<?>[]{new IntComparator(true)}; TupleComparator<Tuple2<Integer, T>> tuple2Comparator = new TupleComparator<>( keyPositions, comparators, serializers);