code: @Override
  	public Comparator<? super Pair<T, I>> comparator() {
  		return new Comparator<Pair<T, I>>() {
  			@Override
  			public int compare(Pair<T, I> o1, Pair<T, I> o2) {
  				int t1 = transactionToIndex(o1.transaction);
  				int t2 = transactionToIndex(o2.transaction);
  				int r = t1 < t2 ? -1 : (t1 == t2 ? 0 : 1);
  				if (r == 0) {
  					int i1 = itemToIndex(o1.item);
  					int i2 = itemToIndex(o2.item);
  					r = i1 < i2 ? -1 : (i1 == i2 ? 0 : 1);
  				}
  				return r;
  			}
  		};
  	}
docs: {@inheritDoc}