Find the pipes that are draining in this pipe (defined by the index parameter).

@param index
the ID of this pipe.
@param cord
the Coordinate of the link where drain.
320201
private void findIdThatDrainsIntoIndex( int index, Coordinate cord ) {
        int t = 0;
        double toll = 0.1;
        for( int i = 0; i < networkPipes.length; i++ ) {
            // if it is this pipe then go haead.
            if (index == i) {
                continue;
            }
            // there isn-t other pipe that can drain in this.
            else if (t == pMaxJunction) {
                break;
            }
            // the id is already set.
            else if (networkPipes[i].getIdPipeWhereDrain() != null) {
                continue;
            }
            // extract the coordinate of the point of the linee of the new pipe.
            Coordinate[] coords = networkPipes[i].point;
            // if one of the coordinates are near of coord then the 2 pipe are
            // linked.
            int lastIndex = coords.length - 1;
            if (cord.distance(coords[0]) < toll) {
                networkPipes[i].setIdPipeWhereDrain(networkPipes[index].getId());
                networkPipes[i].setIndexPipeWhereDrain(index);
                findIdThatDrainsIntoIndex(i, coords[lastIndex]);
                t++;
            } else if (cord.distance(coords[lastIndex]) < toll) {
                networkPipes[i].setIdPipeWhereDrain(networkPipes[index].getId());
                networkPipes[i].setIndexPipeWhereDrain(index);
                findIdThatDrainsIntoIndex(i, coords[0]);
                t++;
            }

        }

    }
1139508
@Override
	public int drainTo(Collection<? super E> c) {
		int i = queue.drainTo(c);
		if (i > 0){
			signalSizeReduced();
		}
		return i;
	}
915622
public final void remove(final int index) {
        AbstractItem removedItem = items.remove(index);

        if (removedItem instanceof Item && ((Item) removedItem).getIcon() != null) {
            iconCount--;
        } else if (removedItem instanceof Divider) {
            dividerCount--;
        }

        rawItems = null;
        notifyOnDataSetChanged();
    }
961318
public com.google.rpc.Help.Link getLinks(int index) {
    return links_.get(index);
  }
845890
public void remove( int index )
	{
		if( (index < 0) || (index >= size) )
		{
			throw new IndexOutOfBoundsException();
		}

		--size;
		for( int i = index; i < size; ++i )
		{
			array[i] = array[i + 1];
		}

		array[size] = null;
	}
147822
public void deleteRule(final int index) throws DOMException {
        try {
            getCssRules().delete(index);
        }
        catch (final IndexOutOfBoundsException e) {
            throw new DOMExceptionImpl(
                DOMException.INDEX_SIZE_ERR,
                DOMExceptionImpl.INDEX_OUT_OF_BOUNDS,
                e.getMessage());
        }
    }
1296693
public void scrollListToLine(int index, int line){
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "scrollListToLine("+index+", "+line+")");
		}
			
		scroller.scrollListToLine(waiter.waitForAndGetView(index, AbsListView.class), line);
	}
254231
public void setIndex(int index) {
        ElementBase parent = getParent();
        
        if (parent == null) {
            CWFException.raise("Element has no parent.");
        }
        
        int currentIndex = parent.children.indexOf(this);
        
        if (currentIndex < 0 || currentIndex == index) {
            return;
        }
        
        parent.moveChild(currentIndex, index);
    }
618618
protected void ensureRestrictedIndex(final int index) {
        if (index < 0) throw new IndexOutOfBoundsException("Index (" + index + ") is negative");
        if (index >= size())
            throw new IndexOutOfBoundsException("Index (" + index + ") is greater than or equal to list size (" + (size()) + ")");
    }
191716
public boolean isNewLine(String line, int index) {
        return index > lastIndex || (index == lastIndex && !Objects.equals(line, lastLine));
    }
648239
public void removeConnective( int index ) {

        if ( this.connectives == null ) {
            return;
        }
        if ( index < 0 || index > connectives.length ) {
            throw new IndexOutOfBoundsException();
        }
        int newIndex = 0;
        final ConnectiveConstraint[] newList = new ConnectiveConstraint[ this.connectives.length - 1 ];
        for ( int i = 0; i < this.connectives.length; i++ ) {
            if ( i != index ) {
                newList[ newIndex++ ] = this.connectives[ i ];
            }
        }
        this.connectives = newList;
    }
1048385
public JobEdge getBackwardConnection(final int index) {

		if (index < this.backwardEdges.size()) {
			return this.backwardEdges.get(index);
		}

		return null;
	}
421462
public OutputGate getOutputGate(int index) {
		if (index < this.outputGates.size()) {
			return this.outputGates.get(index);
		}

		return null;
	}
1209230
private void indexDirectory(String id, fr.pilato.elasticsearch.crawler.fs.beans.Path path) throws Exception {
        esIndex(fsSettings.getElasticsearch().getIndexFolder(),
                id,
                PathParser.toJson(path),
                null);
    }
279908
public boolean scrollListToBottom(int index) {
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "scrollListToBottom("+index+")");
		}
		
		return scroller.scrollList(waiter.waitForAndGetView(index, ListView.class), Scroller.DOWN, true);
	}
636247
public void flushTo( int index )
    {
        ByteArray removed = cba.removeTo( index );
        flusher.flush( removed );
    }
1336031
private void recordIndex(int index) {
        stateLock.writeLock().lock();
        try {
            int insertionPoint = -Arrays.binarySearch(effectiveIndex, index) - 1;
            System.arraycopy(effectiveIndex, insertionPoint, effectiveIndex, insertionPoint + 1, effectiveIndex.length - insertionPoint - 1);
            effectiveIndex[insertionPoint] = index;
        } finally {
            stateLock.writeLock().unlock();
        }
    }