Replies an array of the valid bus halts inside this itinerary.
This function copy the internal data structures into the array.

@return an array of the invalid bus halts inside this itinerary.
354952
@Pure
	public BusItineraryHalt[] toValidBusHaltArray() {
		final BusItineraryHalt[] tab = new BusItineraryHalt[this.validHalts.size()];
		return this.validHalts.toArray(tab);
	}
1147149
public List<Stop<Decision<T>>> getAllStop()
   {
      List<Stop<Decision<T>>> list = new ArrayList<Stop<Decision<T>>>();
      List<Node> nodeList = childNode.get("stop");
      for(Node node: nodeList)
      {
         Stop<Decision<T>>  type = new StopImpl<Decision<T>>(this, "stop", childNode, node);
         list.add(type);
      }
      return list;
   }
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;
	}
425266
@Pure
	public Iterable<BusItineraryHalt> busHalts() {
		final MultiCollection<BusItineraryHalt> halts = new MultiCollection<>();
		halts.addCollection(this.validHalts);
		halts.addCollection(this.invalidHalts);
		return Collections.unmodifiableCollection(halts);
	}
898000
public java.util.List<EbsBlockDevice> getEbsBlockDevices() {
        if (ebsBlockDevices == null) {
            ebsBlockDevices = new com.amazonaws.internal.SdkInternalList<EbsBlockDevice>();
        }
        return ebsBlockDevices;
    }
743066
boolean addBusHalt(BusItineraryHalt halt, int insertToIndex) {
		//set index for right ordering when add to invalid list !
		if (insertToIndex < 0) {
			halt.setInvalidListIndex(this.insertionIndex);
		} else {
			halt.setInvalidListIndex(insertToIndex);
		}

		if (halt.isValidPrimitive()) {
			ListUtil.addIfAbsent(this.validHalts, VALID_HALT_COMPARATOR, halt);
		} else {
			ListUtil.addIfAbsent(this.invalidHalts, INVALID_HALT_COMPARATOR, halt);
		}
		halt.setEventFirable(isEventFirable());
		++this.insertionIndex;
		if (isEventFirable()) {
			fireShapeChanged(new BusChangeEvent(this,
					BusChangeEventType.ITINERARY_HALT_ADDED,
					halt,
					halt.indexInParent(),
					"shape", null, null)); //$NON-NLS-1$
			checkPrimitiveValidity();
		}
		return true;
	}
244483
@Pure
	public List<BusItineraryHalt> getBusHaltsOnSegment(RoadSegment segment) {
		if (this.roadSegments.isEmpty() || this.validHalts.isEmpty()) {
			return Collections.emptyList();
		}

		int cIdxSegment;
		int lIdxSegment = -1;
		int sIdxSegment = -1;
		RoadSegment cSegment;

		final List<BusItineraryHalt> halts = new ArrayList<>();

		for (final BusItineraryHalt bushalt : this.validHalts) {
			cIdxSegment = bushalt.getRoadSegmentIndex();
			if (cIdxSegment >= 0 && cIdxSegment < this.roadSegments.getRoadSegmentCount()
					&& cIdxSegment != lIdxSegment) {
				cSegment = this.roadSegments.getRoadSegmentAt(cIdxSegment);
				lIdxSegment = cIdxSegment;
				if (segment == cSegment) {
					sIdxSegment = cIdxSegment;
				} else if (sIdxSegment != -1) {
					// halt loop now because I'm sure there has no more bus halt
					break;
				}
			}
			if (sIdxSegment != -1) {
				halts.add(bushalt);
			}
		}

		return halts;
	}
982744
public int[][] paths() {
        final int[][] paths = new int[size()][0];
        int i = 0;
        for (final Cycle c : basis.members())
            paths[i++] = c.path();
        return paths;
    }
749985
public String[] getArray()
  {
    
    // Create a copy to return to provide isolation.
    String[] newArray = null;
        
    // Returning a list of the destination names excluding the
    // 'big' destination name.
    newArray = new String[fullMsgPath.size()-1];
    for (int i = 0; i < newArray.length; i++)
    {
      newArray[i] = ((SIDestinationAddress)fullMsgPath.get(i)).getDestinationName();
    }//for
    
    return newArray;
  }
423532
protected CompilationProblem[] collectCompilerProblems() {
        if (this.errors.isEmpty()) {
            return null;
        } else {
            final CompilationProblem[] list = new CompilationProblem[this.errors.size()];
            this.errors.toArray(list);
            return list;
        }
    }
206622
public TypeDesc[] getExceptions() {
        if (mExceptions == null) {
            return new TypeDesc[0];
        }

        ConstantClassInfo[] classes = mExceptions.getExceptions();
        TypeDesc[] types = new TypeDesc[classes.length];
        for (int i=0; i<types.length; i++) {
            types[i] = classes[i].getType();
        }

        return types;
    }
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);
	}
1251599
@Pure
	public static boolean isBusStopNoHaltBindingNamesDrawable() {
		final Preferences prefs = Preferences.userNodeForPackage(BusLayerConstants.class);
		if (prefs != null) {
			return prefs.getBoolean("DRAW_NO_BUS_HALT_BIND_NAMES", DEFAULT_NO_BUS_HALT_BIND_NAMES); //$NON-NLS-1$
		}
		return DEFAULT_NO_BUS_HALT_BIND_NAMES;
	}
259502
private void onBusStopChanged(BusStop stop) {
		if (stop.getContainer() == this) {
			final boolean oldValidity = !ListUtil.contains(this.invalidBusStops, INVALID_STOP_COMPARATOR, stop);
			final boolean currentValidity = stop.isValidPrimitive();
			if (oldValidity != currentValidity) {
				if (currentValidity) {
					ListUtil.remove(this.invalidBusStops, INVALID_STOP_COMPARATOR, stop);
					this.validBusStops.add(stop);
				} else {
					this.validBusStops.remove(stop);
					ListUtil.addIfAbsent(this.invalidBusStops, INVALID_STOP_COMPARATOR, stop);
				}
			}
		}
	}
217438
public java.util.List<TransitGateway> getTransitGateways() {
        if (transitGateways == null) {
            transitGateways = new com.amazonaws.internal.SdkInternalList<TransitGateway>();
        }
        return transitGateways;
    }
42936
public INDArray[] asArray() {
        val val = map.values();
        val res = new INDArray[val.size()];
        int cnt = 0;
        for (val v: val)
            res[cnt++] = v;

        return res;
    }
600752
@Pure
	public Iterator<BusItineraryHalt> busHaltIterator() {
		return Iterators.concat(this.validHalts.iterator(), this.invalidHalts.iterator());
	}