Ejemplo n.º 1
0
    /**
     * Removes a point from bucket.
     *
     * @param point the index of point.
     * @return true if the point was in the bucket.
     */
    boolean remove(int point) {
      int n = entry.size();
      for (int i = 0; i < n; i++) {
        if (entry.get(i) == point) {
          entry.remove(i);
          return true;
        }
      }

      return false;
    }
Ejemplo n.º 2
0
 /**
  * Adds a point to bucket.
  *
  * @param point the index of point.
  */
 void add(int point) {
   entry.add(point);
 }