Builder<Hardware> hardware = ImmutableSet.builder();
for (double cpu : new double[] { 1000, 5000, 10000, 20000 })
for (int ram : new int[] { 512, 1024, 2048, 4096, 8192 }) {
final float size = (float) cpu / 1000;
String id = String.format("cpu=%f,ram=%s,disk=%f", cpu, ram, size);
hardware.add(new HardwareBuilder().supportsImage(new Predicate<Image>() {
@Override
public boolean apply(Image input) {
String toParse = input.getUserMetadata().get("size");
return toParse != null && new Float(toParse) <= size;