/** * Locates all the matching entries for a give host name / address * * @param host The host name / address - ignored if {@code null}/empty * @param entries The {@link HostConfigEntry}-ies to scan - ignored if {@code null}/empty * @return A {@link List} of all the matching entries * @see #isHostMatch(String, int) */ public static List<HostConfigEntry> findMatchingEntries(String host, HostConfigEntry... entries) { // TODO in Java-8 use Stream(s) + predicate if (GenericUtils.isEmpty(host) || GenericUtils.isEmpty(entries)) { return Collections.emptyList(); } else { return findMatchingEntries(host, Arrays.asList(entries)); } }
/** * Locates all the matching entries for a give host name / address * * @param host The host name / address - ignored if {@code null}/empty * @param entries The {@link HostConfigEntry}-ies to scan - ignored if {@code null}/empty * @return A {@link List} of all the matching entries * @see #isHostMatch(String, int) */ public static List<HostConfigEntry> findMatchingEntries(String host, HostConfigEntry... entries) { // TODO in Java-8 use Stream(s) + predicate if (GenericUtils.isEmpty(host) || GenericUtils.isEmpty(entries)) { return Collections.emptyList(); } else { return findMatchingEntries(host, Arrays.asList(entries)); } }