package genetic.types;

public class Gene<A> {
    public A gene;
    public double fitness;

    public Gene(A gene, double fitness) {
        this.gene = gene;
        this.fitness = fitness;
    }
}

package genetic.types;

public class Gene<A> {
    public A gene;
    public double fitness;

    public Gene(A gene, double fitness) {
        this.gene = gene;
        this.fitness = fitness;
    }

    @Override
    public String toString() {
        return "" + fitness;
    }
}

Add toString to Gene