package weeSeepy.util; import java.util.*; import weeSeepy.variables.*; import weeSeepy.problem.*; public class Dictionary { Map M; public Dictionary(){M = new HashMap();} public void add(IntVar key, Integer value){ M.put(key,value); } public Integer get(IntVar key){ Integer v = M.get(key); return v; } /* public void show(){ Iterator it = M.entrySet().iterator(); while (it.hasNext()){ Map.Entry pairs = (Map.Entry)it.next(); System.out.println(pairs.getValue()); } } */ public static void main(String[] args){ Dictionary D = new Dictionary(); Problem pb = new Problem("Test"); int n = 5; IntVar[] v = new IntVar[n]; for (int i=0;i=0;i--) System.out.println(D.get(v[i])); } }