comefrom: <awangdev>Line Reflection_1.java
code: public boolean isReflected(int[][] points) {
          if (points == null || points.length == 0 || points[0] == null || points[0].length == 0) return true;
          
          Map<Integer, Set<Double>> map = new HashMap<>();
          for (int[] point : points) {
              map.putIfAbsent(point[1], new HashSet<>());
              map.get(point[1]).add((double)point[0]);
          }
          
          List<Double> sampleRow = new ArrayList<>(map.get(points[0][1]));
          Collections.sort(sampleRow);
          double mid = (sampleRow.get(0) + sampleRow.get(sampleRow.size() - 1)) / 2;
          
          for (Set<Double> row: map.values()) {
              int left = 0, right = row.size() - 1;
              List<Double> sortedRow = new ArrayList<>(row);
              Collections.sort(sortedRow);
              while (left <= right) {
                  if ((sortedRow.get(left) + sortedRow.get(right)) / 2 != mid) {
                      return false;
                  }
                  left++;
                  right--;
              }
          }
          return true;
      }
masked: public boolean var_0 ( int [ ] [ ] var_1 ) {
    if ( var_1 == null || var_1 . length == 0 || var_1 [ 0 ] == null || var_1 [ 0 ] . length == 0 ) return true ;
    Map < Integer , Set < Double >> var_2 = new HashMap < > ( ) ;
    for ( int [ ] var_3 : var_1 ) {
      var_2 . putIfAbsent ( var_3 [ 1 ] , new HashSet < > ( ) ) ;
      var_2 . get ( var_3 [ 1 ] ) . add ( ( double ) var_3 [ 0 ] ) ;
    }
    List < Double > var_4 = new ArrayList < > ( var_2 . get ( var_1 [ 0 ] [ 1 ] ) ) ;
    Collections . sort ( var_4 ) ;
    double var_5 = ( var_4 . get ( 0 ) + var_4 . get ( var_4 . size ( ) - 1 ) ) / 2 ;
    for ( Set < Double > var_6 : var_2 . values ( ) ) {
      int var_7 = 0 , var_8 = var_6 . size ( ) - 1 ;
      List < Double > var_9 = new ArrayList < > ( var_6 ) ;
      Collections . sort ( var_9 ) ;
      while ( var_7 <= var_8 ) {
        if ( ( var_9 . get ( var_7 ) + var_9 . get ( var_8 ) ) / 2 != var_5 ) {
          return false ;
        }
        var_7 ++ ;
        var_8 -- ;
      }
    }
    return true ;
  }
  