a ={1,3,4} 
b={2,6} 
c={0}  のように、3 つの異なる数値セットがあります。
セットのサイズは可変にすることができます。たとえば、1 つのセットには 5 つの要素があり、別のセットには 3 つの要素があるなどです。
これらの値を Java のハッシュマップに保存しました。
HashMap H=new HashMap<String,HashSet<Integer>>();
この例では、H のキーは "a"、"b"、および "c" です。
これら 3 つのセットの数字の可能な組み合わせをすべて作成したいと思います。つまり、
1,2,0 
1,6,0 
3,2,0 
3,6,0 4,2,0 
4,6,0
です。  
しかし、私には問題があります。セットの数も可変です。つまり、私の HashMap は 3 ~ 10 個のキーを持つことができます。可能なすべての組み合わせを作成できるように、ハッシュマップをどのように反復処理する必要があるか考えていますか?
回答: HashMap を Vector に変更しましたが、少し変更するだけで HashMap でも動作します
次のように関数を呼び出します。
Iterate_over_map(0,new Integer[h.size()],h,final_list);
Iterate_over_map(int count,Integer[] curr,Vector<HashSet<Integer>> h,Vector<Integer[]> final_list)
{
    if(count>=h.size())
    {
        final_list.addElement(curr.clone());
        return;
    }
    int next_count=count+1;
    for (Integer element:h.elementAt(count))
    {
        curr[count]=element;
        Iterate_over_map(next_count,curr,h,final_list);
    }
}
古いソリューション
for(int x:H.get("a"))
{
    v[0]=x;//node1 (an ortholog of node1)
    for(int y:H.get("b"))
    {
        v[1]=y;//node2 (an ortholog of node2)
        for(int z:H.get("c"))
        {
            v[2]=z;//node3 (an ortholog of node3)
        }
    }
}
どうもありがとう。