question: protected static int compareIndices ( Map indexMap , Object obj1 , Object obj2 , Integer fallbackIndex ) { Integer index1 = ( Integer ) indexMap . get ( obj1 ) ; Integer index2 = ( Integer ) indexMap . get ( obj2 ) ; if ( index1 == null ) { index1 = fallbackIndex ; } if ( index2 == null ) { index2 = fallbackIndex ; } return index1 . compareTo ( index2 ) ; }
target:  Helper method to compare two objects by their Integer indices in the given map. If the map doesn't contain an entry for either of the objects, the fallback index will be used for the object instead.