Gets the comp by name.

@return the comp by name
358454
public Comparator<Integer> getCompByName() {
    return new Comparator<Integer>() {
      @Override
      public int compare(Integer t1, Integer t2) {
        Integer p1 = tokenCollection.get(t1).getPositionStart();
        Integer p2 = tokenCollection.get(t2).getPositionStart();
        assert p1 != null : "no position for " + tokenCollection.get(t1);
        assert p2 != null : "no position for " + tokenCollection.get(t2);
        if (p1.equals(p2)) {
          Integer o1 = tokenCollection.get(t1).getOffsetStart();
          Integer o2 = tokenCollection.get(t2).getOffsetStart();
          if (o1 != null && o2 != null) {
            if (o1.equals(o2)) {
              return tokenCollection.get(t1).getValue()
                  .compareTo(tokenCollection.get(t2).getValue());
            } else {
              return o1.compareTo(o2);
            }
          } else {
            return tokenCollection.get(t1).getValue()
                .compareTo(tokenCollection.get(t2).getValue());
          }
        }
        return p1.compareTo(p2);
      }
    };
  }
851948
def get_by_name(self, name):
        
        scopes = self._client.get_all()
        result = [x for x in scopes if x['name'] == name]
        return result[0] if result else None
755507
public Field getField(String name) {
    if (fieldMap == null) {
      return null;
    }
    return fieldMap.get(name);
  }
36606
public
    Appender getAppender(String name) {
        if(name == null)
            return null;

        for (Appender appender : appenderList) {
            if(name.equals(appender.getName()))
                return appender;
        }
        return null;
    }
859385
public String getFirst(String name)
    {
        HeaderName hn = getHeaderName(name);
        return getFirst(hn);
    }
584245
public GeneralNames get(String name) throws IOException {
        if (name.equalsIgnoreCase(SUBJECT_NAME)) {
            return (names);
        } else {
          throw new IOException("Attribute name not recognized by " +
                        "CertAttrSet:SubjectAlternativeName.");
        }
    }
167375
private static Class<?> getClassForName(String name) throws ReflectException {
        try {
            return Class.forName(name);
        } catch (Exception e) {
            throw new ReflectException(e);
        }
    }
870793
public static WebOperation getOperationByName(final String name) throws WebOperationNotFoundException{
        if(!cache.containsKey(name)){
            WebOperation wo = null;

            Map<String,Object> cls = Objects.find((List<Map<String,Object>>)Options.getStorage().getSystem(List.class,"webOperations", new ArrayList()),new Closure<Map<String, Object>, Boolean>() {
                @Override
                public Boolean call(Map<String, Object> input) {
                    return name.equals(Objects.get(input, "name"));
                }
            });
            if(!Objects.isNullOrEmpty(cls)){
                try{
                    wo = (WebOperation)Class.forName(Objects.get(String.class,cls,"class")).newInstance();
                    wo.setConfig(Objects.get(cls, "config", Objects.newHashMap(String.class, Object.class)));
                }catch (Exception e){
                    throw new WebOperationNotFoundException("Cannot initialize WebOperation ("+cls+"): "+e.getMessage(),e);
                }
            }
            if(wo == null)
                throw new WebOperationNotFoundException("WebOperation "+name+" not found");
            cache.put(name,wo);
        }
        return cache.get(name);
    }
380677
@SuppressWarnings("unchecked")
    public <T> T getNamedObject(String name) {
        return (T)_named.get(name);
    }
764304
public static List<String> getSurnames(){
        List<String> result = new ArrayList<>();
        result.addAll(SURNAME_1);
        result.addAll(SURNAME_2);
        Collections.sort(result);
        return result;
    }
711304
@Programmatic
    public ApplicationRole findByNameCached(final String name) {
        return queryResultsCache.execute(new Callable<ApplicationRole>() {
            @Override public ApplicationRole call() throws Exception {
                return findByName(name);
            }
        }, ApplicationRoleRepository.class, "findByNameCached", name);
    }
1092405
public Object get(String name) throws IOException {
        return Boolean.valueOf(isSet(name2Index(name)));
    }
253950
def get_name(self, name):
        """"""
        if name not in self.get_names():
            raise exceptions.NameNotFoundError('name %s not found' % name)
        return self.get_names()[name]
421396
public static NameProvider getNameProvider() {
        NameProvider nameProvider = cNameProvider.get();
        if (nameProvider == null) {
            nameProvider = getDefaultNameProvider();
            if (!cNameProvider.compareAndSet(null, nameProvider)) {
                nameProvider = cNameProvider.get();
            }
        }
        return nameProvider;
    }
851391
public T get(final String name) {
        for (final T i : this) {
            if (i.getName().equals(name)) {
                return i;
            }
        }
        return null;
    }
846116
public Collection<String> getNames() {
		Collection<String> names = new HashSet<String>();
		for (InitParam initParam : initParams) {
			names.add(initParam.getName());
		}
		return names;
	}
578565
@SuppressWarnings("unchecked")
  public <S> S getService(ObjectName name) {
    return (S) servicesByName.get(name);
  }