Remove a bus itinerary from this line.
All the associated stops will be removed also.

@param itinerary is the bus itinerary to remove.
@return <code>true</code> if the bus itinerary was successfully removed, otherwise <code>false</code>
493290
public boolean removeBusItinerary(BusItinerary itinerary) {
		final int index = this.itineraries.indexOf(itinerary);
		if (index >= 0) {
			return removeBusItinerary(index);
		}
		return false;
	}
991267
public static <T> boolean removeAllIterable(Iterable<? extends T> iterable, Collection<T> targetCollection)
    {
        if (iterable == null)
        {
            throw new NullPointerException();
        }
        if (iterable instanceof Collection<?>)
        {
            return targetCollection.removeAll((Collection<T>) iterable);
        }
        int oldSize = targetCollection.size();
        Iterate.forEachWith(iterable, Procedures2.<T>removeFromCollection(), targetCollection);
        return targetCollection.size() != oldSize;
    }
990521
@Pure
	public boolean isStartingBusHalt() {
		final BusItinerary itinerary = getContainer();
		if (itinerary != null && itinerary.isValidPrimitive()) {
			try {
				return itinerary.getBusHaltAt(0) == this;
			} catch (IndexOutOfBoundsException exception) {
				// invalid halt
			}
		}
		return false;
	}
255203
@Override
    public void busReloaded(Object newBus, boolean busChanged,
                            boolean destChg, boolean medChg)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(this, tc, "busReloaded");
            SibTr.exit(this, tc, "busReloaded");
        }
    }
135269
@Pure
	public boolean isEndingBusHalt() {
		final BusItinerary itinerary = getContainer();
		if (itinerary != null && itinerary.isValidPrimitive()) {
			final int count = itinerary.getValidBusHaltCount();
			if (count > 0) {
				try {
					return itinerary.getBusHaltAt(count - 1) == this;
				} catch (IndexOutOfBoundsException exception) {
					// invalid halt
				}
			}
		}
		return false;
	}
537751
public BusItinerary getBusItinerary(String name, Comparator<String> nameComparator) {
		if (name == null) {
			return null;
		}
		final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
		for (final BusItinerary itinerary : this.itineraries) {
			if (cmp.compare(name, itinerary.getName()) == 0) {
				return itinerary;
			}
		}
		return null;
	}
1164063
@Override
	public boolean removeAll(Collection<?> collection) {
		if (booleanTerms == null) {
			return false;
		}
		return booleanTerms.removeAll(collection);
	}
1136218
public boolean removeBusHub(BusHub busHub) {
		if (this.validBusHubs.remove(busHub)) {
			busHub.setContainer(null);
			busHub.setEventFirable(true);
			firePrimitiveChanged(new BusChangeEvent(this,
					BusChangeEventType.HUB_REMOVED,
					busHub,
					-1,
					null,
					null,
					null));
			checkPrimitiveValidity();
			return true;
		}
		final int idx = ListUtil.remove(this.invalidBusHubs, INVALID_HUB_COMPARATOR, busHub);
		if (idx >= 0) {
			busHub.setContainer(null);
			busHub.setEventFirable(true);
			firePrimitiveChanged(new BusChangeEvent(this,
					BusChangeEventType.HUB_REMOVED,
					busHub,
					-1,
					null,
					null,
					null));
			checkPrimitiveValidity();
			return true;
		}
		return false;
	}
494570
public boolean removeAll(Collection<?> collection) {
        boolean result = false;
        synchronized (mLock) {
            Iterator<?> it;
            if (mOriginalValues != null) {
                it = mOriginalValues.iterator();

            } else {
                it = mObjects.iterator();
            }
            while (it.hasNext()) {
                if (collection.contains(it.next())) {
                    it.remove();
                    result = true;
                }
            }
        }
        if (mNotifyOnChange) notifyDataSetChanged();
        return result;
    }
130193
private boolean remove(List<String> list, String item) {
        if (null != list) {
            if (list.remove(item)) {
                this.num_items--;
                return true;
            }
        }
        return false;
    }
1241728
public void removeAllBusItineraries() {
		for (final BusItinerary itinerary : this.itineraries) {
			itinerary.setContainer(null);
			itinerary.setEventFirable(true);
		}
		this.itineraries.clear();
		fireShapeChanged(new BusChangeEvent(this,
				BusChangeEventType.ALL_ITINERARIES_REMOVED,
				null,
				-1,
				"shape", //$NON-NLS-1$
				null,
				null));
		checkPrimitiveValidity();
	}
271104
@Override
	protected void checkPrimitiveValidity() {
		BusPrimitiveInvalidity invalidityReason = null;
		if (this.itineraries.isEmpty()) {
			invalidityReason = new BusPrimitiveInvalidity(
					BusPrimitiveInvalidityType.NO_ITINERARY_IN_LINE,
					null);
		} else {
			final Iterator<BusItinerary> iterator = this.itineraries.iterator();
			BusItinerary itinerary;
			while (iterator.hasNext() && invalidityReason == null) {
				itinerary = iterator.next();
				if (!itinerary.isValidPrimitive()) {
					invalidityReason = new BusPrimitiveInvalidity(
							BusPrimitiveInvalidityType.INVALID_ITINERARY_IN_LINE,
							itinerary.getName());
				}
			}
		}
		setPrimitiveValidity(invalidityReason);
	}
610849
public void removeProject(String projectName) {
        // It should only be in list once (usually in slot 0) but check entire
        // list...
        Iterator<String> it = recentProjectsList.iterator();
        while (it.hasNext()) {
            // LinkedList, so remove() via iterator is faster than
            // remove(index).
            if (projectName.equals(it.next())) {
                it.remove();
            }
        }
    }
1063875
public void removeAllBusHalts() {

		for (final BusItineraryHalt bushalt : this.invalidHalts) {
			bushalt.setContainer(null);
			bushalt.setRoadSegmentIndex(-1);
			bushalt.setPositionOnSegment(Float.NaN);
			bushalt.checkPrimitiveValidity();
		}

		final BusItineraryHalt[] halts = new BusItineraryHalt[this.validHalts.size()];
		this.validHalts.toArray(halts);
		this.validHalts.clear();
		this.invalidHalts.clear();

		for (final BusItineraryHalt bushalt : halts) {
			bushalt.setContainer(null);
			bushalt.setRoadSegmentIndex(-1);
			bushalt.setPositionOnSegment(Float.NaN);
			bushalt.checkPrimitiveValidity();
		}

		fireShapeChanged(new BusChangeEvent(this,
				BusChangeEventType.ALL_ITINERARY_HALTS_REMOVED,
				null,
				-1,
				"shape", //$NON-NLS-1$
				null,
				null));
		checkPrimitiveValidity();
	}
240200
public boolean remove(int index) {

        Widget w = getWidget(index);
        if (w != null) {
            return remove(getWidget(index));
        }
        return false;
    }
759807
public boolean removeBusStop(BusStop busStop) {
		if (this.validBusStops.remove(busStop)) {
			busStop.setContainer(null);
			busStop.setEventFirable(true);
			fireShapeChanged(new BusChangeEvent(this,
					BusChangeEventType.STOP_REMOVED,
					busStop,
					-1,
					"shape", //$NON-NLS-1$
					null,
					null));
			checkPrimitiveValidity();
			return true;
		}
		final int idx = ListUtil.remove(this.invalidBusStops, INVALID_STOP_COMPARATOR, busStop);
		if (idx >= 0) {
			busStop.setContainer(null);
			fireShapeChanged(new BusChangeEvent(this,
					BusChangeEventType.STOP_REMOVED,
					busStop,
					-1,
					"shape", //$NON-NLS-1$
					null,
					null));
			checkPrimitiveValidity();
			return true;
		}
		return false;
	}
809176
public boolean okToForward(String busName)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "okToForward", busName);

    boolean returnVal = false;

    if (busName == null)
      returnVal = true;
    else if (!busName.equals(iBusId))
      returnVal = true;

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "okToForward", new Boolean(returnVal));

    return returnVal;
  }