code: Point addPoint(Point p) {
          if (points.length == pointCount) {
              points = Arrays.copyOf(points, points.length * 2);
          }
          if (points[pointCount] == null) {
              points[pointCount] = new Point();
          }
          if (p != null) {
              p.copyTo(points[pointCount]);
          }
          return points[pointCount++];
      }
docs: Adds a Point to this state object.
  
  @param p the Point describing the data to add, or null if no data is
  available yet for this point. p is not modified,
  but its contents are copied to the object describing the new
  Point.
  @return the Point with the data for the new touch point. The fields of
  this Point may be modified directly to change the data for the new
  touch point.