Java Code Examples for java.util.List#values()

The following examples show how to use java.util.List#values() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClangIncludes.java    From clava with Apache License 2.0 6 votes vote down vote up
@Override
   public String toString() {
StringBuilder builder = new StringBuilder();

for (List<Include> includes : includes.values()) {
    // Get filename from first include
    String source = includes.get(0).getSourceFile().getName();
    builder.append("Includes for '" + source + "':\n");

    builder.append(includes.stream()
	    .map(Include::toString)
	    .collect(Collectors.joining(", ")));

    builder.append("\n");
}

return builder.toString();
   }
 
Example 2
Source File: RequirementRegistration.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 * Get all registration points associated with this registration.
 *
 * @return all registration points. Will not be {@code null} but may be empty
 */
public synchronized Set<RegistrationPoint> getRegistrationPoints() {
    Set<RegistrationPoint> result = new HashSet<>();
    for (List<RegistrationPoint> registrationPoints : registrationPoints.values()) {
        result.addAll(registrationPoints);
    }
    return Collections.unmodifiableSet(result);
}
 
Example 3
Source File: CompositeX509KeyManager.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Chooses the first non-null client alias returned from the delegate {@link X509TrustManagers},
 * or {@code null} if there are no matches.
 */
@Override
public @Nullable String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket){
	for (List<X509KeyManager> keyManagers : keyManagers.values()) {
		for (X509KeyManager x509KeyManager : keyManagers) {
			String alias = x509KeyManager.chooseClientAlias(keyType, issuers, socket);
			if (alias != null) {
				return alias;
			}
		}
	}
	return null;
}
 
Example 4
Source File: CompositeX509KeyManager.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Chooses the first non-null server alias returned from the delegate {@link X509TrustManagers},
 * or {@code null} if there are no matches.
 */
@Override
public @Nullable String chooseServerAlias(String keyType, Principal[] issuers, Socket socket){
	for (List<X509KeyManager> keyManagers : keyManagers.values()) {
		for (X509KeyManager x509KeyManager : keyManagers) {
			String alias = x509KeyManager.chooseServerAlias(keyType, issuers, socket);
			if (alias != null) {
				return alias;
			}
		}
	}
	return null;
}
 
Example 5
Source File: CompositeX509KeyManager.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Returns the first non-null private key associated with the given alias, or {@code null} if
 * the alias can't be found.
 */
@Override
public @Nullable PrivateKey getPrivateKey(String alias){
	for (List<X509KeyManager> keyManagers : keyManagers.values()) {
		for (X509KeyManager x509KeyManager : keyManagers) {
			PrivateKey privateKey = x509KeyManager.getPrivateKey(alias);
			if (privateKey != null) {
				return privateKey;
			}
		}
	}
	return null;
}
 
Example 6
Source File: CompositeX509KeyManager.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Returns the first non-null certificate chain associated with the given alias, or {@code null}
 * if the alias can't be found.
 */
@Override
public @Nullable X509Certificate[] getCertificateChain(String alias){
	for (List<X509KeyManager> keyManagers : keyManagers.values()) {
		for (X509KeyManager x509KeyManager : keyManagers) {
			X509Certificate[] chain = x509KeyManager.getCertificateChain(alias);
			if (chain != null && chain.length > 0) {
				return chain;
			}
		}
	}
	return null;
}
 
Example 7
Source File: CompositeX509KeyManager.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Get all matching aliases for authenticating the client side of a secure socket, or
 * {@code null} if there are no matches.
 */
@Override
public @Nullable String[] getClientAliases(String keyType, Principal[] issuers){
	List<String> ret = new ArrayList<>();
	for (List<X509KeyManager> keyManagers : keyManagers.values()) {
		for (X509KeyManager x509KeyManager : keyManagers) {
			ret.addAll(Arrays.asList(x509KeyManager.getClientAliases(keyType, issuers)));
		}
	}
	return ret.toArray(new String[ret.size()]);
}
 
Example 8
Source File: CompositeX509KeyManager.java    From elexis-3-core with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Get all matching aliases for authenticating the server side of a secure socket, or
 * {@code null} if there are no matches.
 */
@Override
public @Nullable String[] getServerAliases(String keyType, Principal[] issuers){
	List<String> ret = new ArrayList<>();
	for (List<X509KeyManager> keyManagers : keyManagers.values()) {
		for (X509KeyManager x509KeyManager : keyManagers) {
			ret.addAll(Arrays.asList(x509KeyManager.getServerAliases(keyType, issuers)));
		}
	}
	return ret.toArray(new String[ret.size()]);
}