Find all instances of cookies in the cache with the given name and add
clones of those objects to the input list.

@param name
@param list
@return int - number of cookies added to the list
338860
public int getAllCookies(String name, List<HttpCookie> list) {
        int added = 0;
        if (0 < this.parsedList.size() && null != name) {
            for (HttpCookie cookie : this.parsedList) {
                if (cookie.getName().equals(name)) {
                    list.add(cookie.clone());
                    added++;
                }
            }
        }
        return added;
    }
1141704
public void put(String name, List<String> list) {
        remove(name);
        for (String v : list)
            if (v != null)
                add(name, v);
    }
1077323
static ImmutableList<ListFindingsResult> listAllFindings(OrganizationName organizationName) {
    try (SecurityCenterClient client = SecurityCenterClient.create()) {
      // OrganizationName organizationName = OrganizationName.of(/*organizationId=*/"123234324");
      // "-" Indicates listing across all sources.
      SourceName sourceName = SourceName.of(organizationName.getOrganization(), "-");

      ListFindingsRequest.Builder request =
          ListFindingsRequest.newBuilder().setParent(sourceName.toString());

      // Call the API.
      ListFindingsPagedResponse response = client.listFindings(request.build());

      // This creates one list for all findings.  If your organization has a large number of
      // findings this can cause out of memory issues.  You can process them in incrementally
      // by returning the Iterable returned response.iterateAll() directly.
      ImmutableList<ListFindingsResult> results = ImmutableList.copyOf(response.iterateAll());
      System.out.println("Findings:");
      System.out.println(results);
      return results;
    } catch (IOException e) {
      throw new RuntimeException("Couldn't create client.", e);
    }
  }
354405
public List<String> encode(Iterable<? extends Cookie> cookies) {
        Iterator<? extends Cookie> cookiesIt = checkNotNull(cookies, "cookies").iterator();
        if (!cookiesIt.hasNext()) {
            return Collections.emptyList();
        }

        List<String> encoded = new ArrayList<String>();
        Cookie firstCookie = cookiesIt.next();
        Map<String, Integer> nameToIndex = strict && cookiesIt.hasNext() ? new HashMap<String, Integer>() : null;
        int i = 0;
        encoded.add(encode(firstCookie));
        boolean hasDupdName = nameToIndex != null && nameToIndex.put(firstCookie.name(), i++) != null;
        while (cookiesIt.hasNext()) {
            Cookie c = cookiesIt.next();
            encoded.add(encode(c));
            if (nameToIndex != null) {
                hasDupdName |= nameToIndex.put(c.name(), i++) != null;
            }
        }
        return hasDupdName ? dedup(encoded, nameToIndex) : encoded;
    }
744625
public List<YokeCookie> getAllCookies(@NotNull final String name) {
        List<YokeCookie> foundCookies = new ArrayList<>();
        if (cookies != null) {
            for (YokeCookie c : cookies) {
                if (name.equals(c.name())) {
                    foundCookies.add(c);
                }
            }
        }
        return foundCookies;
    }
757249
public static Cookie getCookie(HttpServletRequest request, String name) {
    Cookie[] cookies = request.getCookies();
    Cookie returnCookie = null;

    if (cookies == null) { return returnCookie; }
    for (int i = 0; i < cookies.length; i++) {
      Cookie thisCookie = cookies[i];
      if (thisCookie.getName().equals(name) && !thisCookie.getValue().equals("")) {
        returnCookie = thisCookie;
        break;
      }
    }
    return returnCookie;
  }
1160162
public static void print(String name, List<?> list) {
		JK.line();
		print(String.format("List (%s):", name));
		int index = 1;
		for (Object object : list) {
			JK.print(String.format("\t%d) %s", index++, object));
		}
		JK.line();
	}
608835
public List getList(String name) {
        Object paramValues = get(name);
        if (paramValues == null) {
            return Collections.emptyList();
        }
        if (paramValues.getClass().isArray()) {
            return Arrays.asList((Object[])paramValues);
        }
        if (paramValues instanceof Collection) {
            return new ArrayList((Collection)paramValues);
        }
        return Collections.singletonList(paramValues);
    }
1252782
public String getCookie(String name) {
		Cookie c = requestCookies.get().get(name);
		return c == null ? null : c.getValue();
	}
807508
public CookieCacheData duplicate() {
        // Create second instance and copy members
        CookieCacheData cData = new CookieCacheData();
        cData.parsedList = copyList(this.parsedList);
        cData.isDirty = this.isDirty;
        cData.hdrIndex = this.hdrIndex;
        cData.headerType = this.headerType;
        return cData;
    }
815981
public List<Method> getMethods( String name )
    {
        List<Method> methods = new ArrayList<Method>();
        
        for (Method method : target.getMethods())
        {
            if (compare( method.getName(), name )) methods.add(method);
        }
        return methods;
    }
855596
public static Cookie getCookie(String name, HttpServletRequest request) {
        Cookie[] cookies = request.getCookies();
        if (ArrayUtils.isNotEmpty(cookies)) {
            for (Cookie cookie : cookies) {
                if (cookie.getName().equals(name)) {
                    return cookie;
                }
            }
        }

        return null;
    }
847075
public List getAllCookieValues(String cookieName){

        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        List cookieValues = _request.getAllCookieValues(cookieName);
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getAllCookieValues", " name --> " + cookieName + " values --> " + cookieValues);
        }
        return cookieValues;
    }
873777
public <T extends CacheSpec<K, V>> T name(String name) {
      this.name = name;
      return Cast.as(this);
   }
1163997
public static int removeDuplicateNodeList(List<String> list) {

        int originCount = list.size();
        // add elements to all, including duplicates
        HashSet<String> hs = new LinkedHashSet<String>();
        hs.addAll(list);
        list.clear();
        list.addAll(hs);

        return originCount - list.size();
    }
398995
public Long getCookieToLong(String name) {
		String result = getCookie(name);
		return result != null ? Long.parseLong(result) : null;
	}
490649
public Collection<Server> list(String name)
    {
        List<Server> ret = new ArrayList<Server>();
        Collection<Server> servers = list();
        for(Server server : servers)
        {
            if(name == null || server.getName().equals(name))
                ret.add(server);
        }
        return ret;
    }