find min value of a vector and assign the correspoding string
<p>i am having difficulty of finding the right approach of my problem.(noobAlert!)
 I have a FOR loop and inside i calculate a float number and add it in a vector.
 Every iteration of the loop corrisponds to a float number and a name(string).
 After the loop i find the min value of this vector,and my problem is that i cant find a way to "connect" it to the correspoding   string.</p>

<p>I have the impression that it is a stupid question,and that i m searching probably in the wrong places, nevertheless i really need some help here!thnx for your attention..</p>

<p>Every Item  corresponds to a float number which is the result of a ranking algorithm.
 I simply want to get the minValue and its corrisponding Item.:-)</p>

<pre><code>for (int j = 0; j &lt; energySource.size(); j++) {
                    Item sourceItem = (Item) energySource.elementAt(j);
                    if (supply.description.isACover(sourceItem.description)) {
                        if (reasoner.checkCompatibility(supply.description, sourceItem.description)) {

                            int RPOT = reasoner.rankPotential(supply.description, sourceItem.description);
                            rSRC = alfaSRC * RPOT;
                        } else {
                            SemanticDescription[] contract = reasoner.contraction(sourceItem.description, supply.description);
                            int RPOT = reasoner.rankPotential(contract[1], sourceItem.description);
                            int RPAR = reasoner.rankPartial(contract[0], sourceItem.description);
                            rSRC = alfaSRC * RPOT + betaSRC * RPAR;
                        }

                        rTOT1 = (alfaTOT * rSRC + betaTOT * rSRC) / depthSrc;
                        totVector.add(rTOT1);



                        if (rTOT1 &lt; minScore) {
                            minScore = rTOT1;
                            bestFunct = supply;
                            bestIndex = j;
                        }

                        System.out.println(supply.name + " + " + sourceItem.name + "    &gt;&gt;&gt;rTOT1 " + rTOT1);

                    } else {
                        candidati.removeElementAt(j);
                        j--;
                    }


                }

                //rTOT1min=&gt;minValue of totVector
                Object rTOT1min = Collections.min(totVector);
                Float bestRank = (float) rTOT1min;  
                System.out.println("  Best Rank : " + bestRank + " Source chosen : " + ______???______);
</code></pre>
