@@ -0,0 +1,758 @@
+package org.pfaa.chemica.model;%0A%0Aimport java.util.List;%0A%0Aimport com.google.common.base.Function;%0Aimport com.google.common.collect.Lists;%0A%0Apublic abstract class MixtureUtils %7B%0A%09public static Mixture concentrate(Mixture mixture, int factor) %7B%0A%09%09List%3CMixtureComponent%3E comps = mixture.getComponents();%0A%09%09return new SimpleMixture(Lists.transform(comps, new ConcentrateFunction(factor)));%0A%09%7D%0A%09%0A%09public static class ConcentrateFunction implements Function%3CMixtureComponent,MixtureComponent%3E  %7B%0A%09%09%0A%09%09private int factor;%0A%0A%09%09public ConcentrateFunction(int factor) %7B%0A%09%09%09this.factor = factor;%0A%09%09%7D%0A%09%09%0A%09%09@Override%0A%09%09public MixtureComponent apply(MixtureComponent input) %7B%0A%09%09%09if (input.weight %3C 1.0)%0A%09%09%09%09return input.concentrate(this.factor);%0A%09%09%09return input;%0A%09%09%7D%0A%09%09%0A%09%7D%0A%7D%0A

add (unused) utility for concentrating mixture