refactor: Add missing public modifiers
@@ -21,82 +21,82 @@ import org.apache.commons.lang3.StringUtils;
public enum GCPResourceType {
CPU {
@Override
- boolean isRequired(final GCPMachine machine) {
+ public boolean isRequired(final GCPMachine machine) {
return machine.getCpu() > 0;
}
@Override
- String billingKey(final GCPBilling billing, final GCPMachine machine) {
+ public String billingKey(final GCPBilling billing, final GCPMachine machine) {
return String.format(BILLING_KEY_PATTERN, alias(), billing.alias(), machine.getFamily());
}
@Override
- String family(final GCPMachine machine) {
+ public String family(final GCPMachine machine) {
return machine.getFamily();
}
@Override
- long price(final GCPMachine machine, final GCPResourcePrice price) {
+ public long price(final GCPMachine machine, final GCPResourcePrice price) {
return machine.getCpu() * price.getNanos();
}
},
RAM {
@Override
- boolean isRequired(final GCPMachine machine) {
+ public boolean isRequired(final GCPMachine machine) {
return machine.getRam() > 0;
}
@Override
- String billingKey(final GCPBilling billing, final GCPMachine machine) {
+ public String billingKey(final GCPBilling billing, final GCPMachine machine) {
return String.format(BILLING_KEY_PATTERN, alias(), billing.alias(), machine.getFamily());
}
@Override
- String family(final GCPMachine machine) {
+ public String family(final GCPMachine machine) {
return machine.getFamily();
}
@Override
- long price(final GCPMachine machine, final GCPResourcePrice price) {
+ public long price(final GCPMachine machine, final GCPResourcePrice price) {
return Math.round(machine.getRam() * price.getNanos());
}
},
GPU {
@Override
- boolean isRequired(final GCPMachine machine) {
+ public boolean isRequired(final GCPMachine machine) {
return machine.getGpu() > 0 && StringUtils.isNotBlank(machine.getGpuType());
}
@Override
- String billingKey(final GCPBilling billing, final GCPMachine machine) {
+ public String billingKey(final GCPBilling billing, final GCPMachine machine) {
return String.format(BILLING_KEY_PATTERN, alias(), billing.alias(), machine.getGpuType().toLowerCase());
}
@Override
- String family(final GCPMachine machine) {
+ public String family(final GCPMachine machine) {
return machine.getGpuType();
}
@Override
- long price(final GCPMachine machine, final GCPResourcePrice price) {
+ public long price(final GCPMachine machine, final GCPResourcePrice price) {
return machine.getGpu() * price.getNanos();
}
};
private static final String BILLING_KEY_PATTERN = "%s_%s_%s";
- String alias() {
+ public String alias() {
return name().toLowerCase();
}
- abstract boolean isRequired(GCPMachine machine);
+ public abstract boolean isRequired(GCPMachine machine);
- abstract String billingKey(GCPBilling billing, GCPMachine machine);
+ public abstract String billingKey(GCPBilling billing, GCPMachine machine);
- abstract String family(GCPMachine machine);
+ public abstract String family(GCPMachine machine);
- abstract long price(GCPMachine machine, GCPResourcePrice price);
+ public abstract long price(GCPMachine machine, GCPResourcePrice price);
}
