Package forestry.api.genetics

Examples of forestry.api.genetics.IMutation


public class ConverterIAlleles implements Converter {
    @Override
    public void convert(final Object value, final Map<Object, Object> output) {
        if (value instanceof IMutation) {
            IMutation mutation = (IMutation) value;

            IAllele allele1 = mutation.getAllele0();
            if (allele1 instanceof IAlleleSpecies) {
                Map<Object, Object> allelMap1 = Maps.newHashMap();
                convert(allele1, allelMap1);
                output.put("allele1", allelMap1);
            }
            IAllele allele2 = mutation.getAllele1();
            if (allele2 instanceof IAlleleSpecies) {
                Map<Object, Object> allelMap2 = Maps.newHashMap();
                convert(allele2, allelMap2);
                output.put("allele2", allelMap2);
            }
            output.put("chance", mutation.getBaseChance());
            output.put("specialConditions", mutation.getSpecialConditions().toArray());
        }

        if (value instanceof IAlleleSpecies) {
            convertAlleleSpecies((IAlleleSpecies) value, output);
        }
View Full Code Here

TOP

Related Classes of forestry.api.genetics.IMutation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.