aboutsummaryrefslogtreecommitdiffstats
path: root/config-provisioning
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-04-11 10:27:59 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2024-04-11 16:07:22 +0200
commit48b9513ee685145d338e0cf9970193ba8254ce33 (patch)
treed9f489b0c1ffd448bc067441b032adfb1c379f1b /config-provisioning
parentef1cf91e0d21ceb4c40d1a6efd62d3dabd08cb86 (diff)
Unify on Set.of
Diffstat (limited to 'config-provisioning')
-rw-r--r--config-provisioning/src/main/java/com/yahoo/config/provision/HostFilter.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/HostFilter.java b/config-provisioning/src/main/java/com/yahoo/config/provision/HostFilter.java
index 4fe6f8453de..f79fee08bc4 100644
--- a/config-provisioning/src/main/java/com/yahoo/config/provision/HostFilter.java
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/HostFilter.java
@@ -4,7 +4,6 @@ package com.yahoo.config.provision;
import com.yahoo.text.StringUtilities;
import java.util.Collection;
-import java.util.Collections;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
@@ -44,27 +43,27 @@ public class HostFilter {
/** Returns a filter which matches all hosts */
public static HostFilter all() {
- return new HostFilter(Collections.emptySet(), Collections.emptySet(), Collections.emptySet(), Collections.emptySet());
+ return new HostFilter(Set.of(), Set.of(), Set.of(), Set.of());
}
/** Returns a filter which matches a given host only */
public static HostFilter hostname(String hostname) {
- return new HostFilter(Collections.singleton(hostname), Collections.emptySet(), Collections.emptySet(), Collections.emptySet());
+ return new HostFilter(Set.of(hostname), Set.of(), Set.of(), Set.of());
}
/** Returns a filter which matches a given flavor only */
public static HostFilter flavor(String flavor) {
- return new HostFilter(Collections.emptySet(), Collections.singleton(flavor), Collections.emptySet(), Collections.emptySet());
+ return new HostFilter(Set.of(), Set.of(flavor), Set.of(), Set.of());
}
/** Returns a filter which matches a given cluster type only */
public static HostFilter clusterType(ClusterSpec.Type clusterType) {
- return new HostFilter(Collections.emptySet(), Collections.emptySet(), Collections.singleton(clusterType), Collections.emptySet());
+ return new HostFilter(Set.of(), Set.of(), Set.of(clusterType), Set.of());
}
/** Returns a filter which matches a given cluster id only */
public static HostFilter clusterId(ClusterSpec.Id clusterId) {
- return new HostFilter(Collections.emptySet(), Collections.emptySet(), Collections.emptySet(), Collections.singleton(clusterId));
+ return new HostFilter(Set.of(), Set.of(), Set.of(), Set.of(clusterId));
}
/** Returns a host filter from three optional conditions */