Remove defaultName
@@ -14,19 +14,14 @@ import java.util.regex.Pattern;
public class CloudName extends PatternedStringWrapper<CloudName> {
private static final Pattern pattern = Pattern.compile("[a-z]([a-z0-9-]*[a-z0-9])*");
- public static final CloudName AWS = new CloudName("aws");
- public static final CloudName GCP = new CloudName("gcp");
+ public static final CloudName AWS = from("aws");
+ public static final CloudName GCP = from("gcp");
public static final CloudName DEFAULT = from("default");
- private static final CloudName defaultCloud = from("default");
private CloudName(String cloud) {
super(cloud, pattern, "cloud name");
}
- public static CloudName defaultName() {
- return defaultCloud;
- }
-
public static CloudName from(String cloud) {
return new CloudName(cloud);
}
