How to make this function return more than 1 value?
<pre><code>public Solution getReferenceSolution(Problem p) {

        int personalityVal = 1;
        int templateNameVal = 0;
        ...

        Solution personality = getComponentFactory().constructSolution(personalityVal);
        Solution templateName = getComponentFactory().constructSolution(templateNameVal);
        ...

        return personality,templateName,..;
    }
</code></pre>

<p>Here is the original code for class Solution:</p>

<pre><code>public class Solution
extends Object
implements java.io.Serializable,
edu.indiana.iucbrf.feature.Featured,
Comparable,
edu.indiana.util.xml.XMLRepresentable {
    private FeatureKey firstFeatureKey;
    private FeatureCollection features;

    /** Creates new Solution.
     */
    protected Solution() {
    }

    public Solution(FeatureCollection features,
    Domain domain) {

        this.features = features;
    }

    public boolean getIsReferenceSolution() {
        return features.getIsReferenceSolution();
    }

    public void setIsReferenceSolution(boolean isReferenceSolution) {
        features.setIsReferenceSolution(isReferenceSolution);
    }


    public boolean equals(Object other) {
        return (this.compareTo(other) == 0);
    }
}
</code></pre>

<p>Here is inside Domain class code:</p>

<pre><code>public Solution[] getReferenceSolution(Problem p)
        throws UnsupportedOperationException {
        Solution result;

        if (!haveReferenceSolution)
            throw new UnsupportedOperationException("Domain.getReferenceSolution: A getReferenceSolution() method has not been specified for this domain.  If its use is required, please specify one using setEquivalenceClasses() or by overriding Domain.getReferenceSolution().");
        else {
            if (haveBooleanSolutionCutoff)
                result = findNearestEquivalenceClass(p).applyTo(p, booleanSolutionCutoff);
            else
                result = findNearestEquivalenceClass(p).applyTo(p);
        }

        result.setIsReferenceSolution(true);

        return result;  //&lt;---- error over here!
    }
</code></pre>
