/** * Return a predicate which matches the given authentication scheme. * * @param authentication the authentication scheme * @return the predicate */ public static CipherSuitePredicate matchAuthentication(Authentication authentication) { return authentication == null ? matchFalse() : new AuthenticationCipherSuitePredicate(true, EnumSet.of(authentication)); }
/** * Return a predicate which matches any of the given authentication schemes. * * @param authentications the authentication schemes * @return the predicate */ public static CipherSuitePredicate matchAuthentication(Authentication... authentications) { authentications = withoutNulls(authentications); return authentications == null || authentications.length == 0 ? matchFalse() : authentications.length == Authentication.fullSize ? matchTrue() : new AuthenticationCipherSuitePredicate(true, EnumSet.of(authentications[0], authentications)); }
/** * Return a predicate which matches any of the given authentication schemes. * * @param authentications the authentication schemes * @return the predicate */ public static CipherSuitePredicate matchAuthentication(EnumSet<Authentication> authentications) { return authentications == null || authentications.isEmpty() ? matchFalse() : Authentication.isFull(authentications) ? matchTrue() : optimize(new AuthenticationCipherSuitePredicate(true, authentications)); }
/** * Return a predicate which matches the given authentication scheme. * * @param authentication the authentication scheme * @return the predicate */ public static CipherSuitePredicate matchAuthentication(Authentication authentication) { return authentication == null ? matchFalse() : new AuthenticationCipherSuitePredicate(true, EnumSet.of(authentication)); }
/** * Return a predicate which matches the given authentication scheme. * * @param authentication the authentication scheme * @return the predicate */ public static CipherSuitePredicate matchAuthentication(Authentication authentication) { return authentication == null ? matchFalse() : new AuthenticationCipherSuitePredicate(true, EnumSet.of(authentication)); }
/** * Return a predicate which matches the given authentication scheme. * * @param authentication the authentication scheme * @return the predicate */ public static CipherSuitePredicate matchAuthentication(Authentication authentication) { return authentication == null ? matchFalse() : new AuthenticationCipherSuitePredicate(true, EnumSet.of(authentication)); }
/** * Return a predicate which matches any of the given authentication schemes. * * @param authentications the authentication schemes * @return the predicate */ public static CipherSuitePredicate matchAuthentication(Authentication... authentications) { authentications = withoutNulls(authentications); return authentications == null || authentications.length == 0 ? matchFalse() : authentications.length == Authentication.fullSize ? matchTrue() : new AuthenticationCipherSuitePredicate(true, EnumSet.of(authentications[0], authentications)); }
/** * Return a predicate which matches any of the given authentication schemes. * * @param authentications the authentication schemes * @return the predicate */ public static CipherSuitePredicate matchAuthentication(Authentication... authentications) { authentications = withoutNulls(authentications); return authentications == null || authentications.length == 0 ? matchFalse() : authentications.length == Authentication.fullSize ? matchTrue() : new AuthenticationCipherSuitePredicate(true, EnumSet.of(authentications[0], authentications)); }
/** * Return a predicate which matches any of the given authentication schemes. * * @param authentications the authentication schemes * @return the predicate */ public static CipherSuitePredicate matchAuthentication(Authentication... authentications) { authentications = withoutNulls(authentications); return authentications == null || authentications.length == 0 ? matchFalse() : authentications.length == Authentication.fullSize ? matchTrue() : new AuthenticationCipherSuitePredicate(true, EnumSet.of(authentications[0], authentications)); }
/** * Return a predicate which matches any of the given authentication schemes. * * @param authentications the authentication schemes * @return the predicate */ public static CipherSuitePredicate matchAuthentication(EnumSet<Authentication> authentications) { return authentications == null || authentications.isEmpty() ? matchFalse() : Authentication.isFull(authentications) ? matchTrue() : optimize(new AuthenticationCipherSuitePredicate(true, authentications)); }
/** * Return a predicate which matches any of the given authentication schemes. * * @param authentications the authentication schemes * @return the predicate */ public static CipherSuitePredicate matchAuthentication(EnumSet<Authentication> authentications) { return authentications == null || authentications.isEmpty() ? matchFalse() : Authentication.isFull(authentications) ? matchTrue() : optimize(new AuthenticationCipherSuitePredicate(true, authentications)); }
/** * Return a predicate which matches any of the given authentication schemes. * * @param authentications the authentication schemes * @return the predicate */ public static CipherSuitePredicate matchAuthentication(EnumSet<Authentication> authentications) { return authentications == null || authentications.isEmpty() ? matchFalse() : Authentication.isFull(authentications) ? matchTrue() : optimize(new AuthenticationCipherSuitePredicate(true, authentications)); }