Replies the bus stop with the specified name.

@param name is the desired name
@param nameComparator is used to compare the names.
@return BusStop or <code>null</code>
970665
@Pure
	public BusStop getBusStop(String name, Comparator<String> nameComparator) {
		if (name == null) {
			return null;
		}
		final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
		for (final BusStop busStop : this.validBusStops) {
			if (cmp.compare(name, busStop.getName()) == 0) {
				return busStop;
			}
		}
		for (final BusStop busStop : this.invalidBusStops) {
			if (cmp.compare(name, busStop.getName()) == 0) {
				return busStop;
			}
		}
		return null;
	}
851391
public T get(final String name) {
        for (final T i : this) {
            if (i.getName().equals(name)) {
                return i;
            }
        }
        return null;
    }
731108
public JsBus getBus(String name) throws SIBExceptionBusNotFound {
    if (!isInitialized()) {
      return null;
    }
    return _jsmain.getBus(name);
  }
1350234
public boolean startsWith(Name name) {
		if (name.size() == 0) {
			return false;
		}

		DistinguishedName start = null;
		if (name instanceof DistinguishedName) {
			start = (DistinguishedName) name;
		}
		else {
			return false;
		}

		if (start.size() > this.size()) {
			return false;
		}

		Iterator longiter = names.iterator();
		Iterator shortiter = start.getNames().iterator();

		while (shortiter.hasNext()) {
			Object longname = longiter.next();
			Object shortname = shortiter.next();

			if (!longname.equals(shortname)) {
				return false;
			}
		}

		// All names in shortiter matched.
		return true;
	}
492812
public boolean removeBusStop(BusStop busStop) {
		final int index = this.busStops.indexOf(busStop);
		if (index >= 0) {
			this.busStops.remove(index);
			busStop.removeBusHub(this);
			resetBoundingBox();
			firePrimitiveChanged(new BusChangeEvent(this,
					BusChangeEventType.STOP_REMOVED,
					busStop,
					index,
					null,
					null,
					null));
			checkPrimitiveValidity();
			return true;
		}
		return false;
	}
163754
public RequestDispatcher getNamedDispatcher(String name)
    {
        if (name == null || name.length()==0)
            name=__DEFAULT_SERVLET;

        try { return new Dispatcher(ServletHandler.this,name); }
        catch(Exception e) {LogSupport.ignore(log,e);}
        
        return null;
    }
996626
private final CClassLoader getLoaderByName(final String name) {
		try {

			CClassLoader loader = (CClassLoader) this.childrenMap.get(name);

			if (loader == null) {
				loader = CClassLoader.createLoader(this, name);
				this.childrenMap.put(name, loader);
			}

			return loader;
		} finally {
			try {

			} catch (final Exception ignore) {
			}
		}
	}
430738
public CmsUrlNameMappingFilter filterName(String name) {

        if (name == null) {
            throw new IllegalArgumentException();
        }
        CmsUrlNameMappingFilter result = new CmsUrlNameMappingFilter(this);
        result.m_name = name;
        return result;
    }
1168535
@Pure
	public BusStop getBusStop(UUID id) {
		if (id == null) {
			return null;
		}
		for (final BusStop busStop : this.validBusStops) {
			final UUID busid = busStop.getUUID();
			if (id.equals(busid)) {
				return busStop;
			}
		}
		for (final BusStop busStop : this.invalidBusStops) {
			final UUID busid = busStop.getUUID();
			if (id.equals(busid)) {
				return busStop;
			}
		}
		return null;
	}
1000812
static public Bus getBy(String busName){
		if(busName==null)
			return get();
		
		Bus bus = busMap.get(busName);
		if(bus==null) {
			bus=new Bus();
			busMap.put(busName, bus);
		}
		return bus;
	}
82397
public boolean removeBusHalt(String name) {
		Iterator<BusItineraryHalt> iterator = this.validHalts.iterator();
		BusItineraryHalt bushalt;
		int i = 0;
		while (iterator.hasNext()) {
			bushalt = iterator.next();
			if (name.equals(bushalt.getName())) {
				return removeBusHalt(i);
			}
			++i;
		}

		iterator = this.invalidHalts.iterator();
		i = 0;
		while (iterator.hasNext()) {
			bushalt = iterator.next();
			if (name.equals(bushalt.getName())) {
				return removeBusHalt(i);
			}
			++i;
		}

		return false;
	}
595532
@Override
	public void setName(String name) {
		if (name == null) {
			super.setName(getFirstFreeBusStopName(getContainer()));
		} else {
			super.setName(name);
		}
	}
520181
public static void setBusStopNamesDrawable(Boolean isNamesDrawable) {
		final Preferences prefs = Preferences.userNodeForPackage(BusLayerConstants.class);
		if (prefs != null) {
			if (isNamesDrawable == null) {
				prefs.remove("DRAW_BUS_STOPS_NAMES"); //$NON-NLS-1$
			} else {
				prefs.putBoolean("DRAW_BUS_STOPS_NAMES", isNamesDrawable.booleanValue()); //$NON-NLS-1$
			}
			try {
				prefs.sync();
			} catch (BackingStoreException exception) {
				//
			}
		}
	}
321663
public static final void serverShortName(String name)
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "serverShortName", name);

        _serverShortName = name;

        if (tc.isEntryEnabled())
            Tr.exit(tc, "serverShortName");
    }
1050383
public static void stop(String name) {
        Long start = PENDING.remove(name);
        if (start == null) {
            return;
        }
        long duration = System.currentTimeMillis() - start;
        Counter sum = CUMULATED.computeIfAbsent(name, k -> new Counter(k, "ms"));
        sum.increment(duration);
    }
961347
public TypeName findParameterTypeByAliasOrName(String name) {
		if (parameterAlias2NameField.containsKey(name)) {
			return findParameterType(parameterAlias2NameField.get(name));
		}

		return findParameterType(name);
	}
684433
@Pure
	public static String getFirstFreeBusItineraryName(BusLine busline) {
		if (busline == null) {
			return null;
		}
		int nb = busline.getBusItineraryCount();
		String name;
		do {
			++nb;
			name = Locale.getString("NAME_TEMPLATE", Integer.toString(nb)); //$NON-NLS-1$
		}
		while (busline.getBusItinerary(name) != null);
		return name;
	}