code: boolean equalsSorted(TouchState ts) {
          if (ts.pointCount == pointCount
                  && ts.primaryID == primaryID
                  && ts.window == window) {
              for (int i = 0; i < pointCount; i++) {
                  Point p1 = ts.points[i];
                  Point p2 = points[i];
                  if (p1.x != p2.x || p1.y != p2.y || p1.id != p2.id) {
                      return false;
                  }
              }
              return true;
          } else {
              return false;
          }
      }
docs: Compare two non-null states whose points are sorted by ID