Blame view
circus/src/jcircus/complementaryenvs/ProcMuIndexEnv.java
1.9 KB
8d0dc533f
![]() |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
package jcircus.complementaryenvs; import java.util.HashMap; import java.util.LinkedHashMap; public class ProcMuIndexEnv { HashMap <String, HashMap <String, Integer>> mapmu; HashMap <String, HashMap <String, Integer>> mapnparams; public ProcMuIndexEnv () { this.mapmu = new LinkedHashMap <String, HashMap <String, Integer>> (); this.mapnparams = new LinkedHashMap <String, HashMap <String, Integer>> (); } public void putmu (String process, HashMap <String, Integer> mu) { this.mapmu.put(process, mu); } public void putmu (String process, String muname, Integer index) { if (this.mapmu.get(process) == null) { this.mapmu.put(process, new HashMap <String, Integer> ()); } this.mapmu.get(process).put(muname, index); } public void putnparams (String process, HashMap <String, Integer> mu) { this.mapnparams.put(process, mu); } public void putnparams (String process, String muname, Integer index) { if (this.mapnparams.get(process) == null) { this.mapnparams.put(process, new HashMap <String, Integer> ()); } this.mapnparams.get(process).put(muname, index); } public HashMap <String, Integer> getmu (String process) { return this.mapmu.get(process); } public Integer getmu (String process, String muaction) { HashMap <String, Integer> mumap = this.mapmu.get(process); if (mumap == null) { System.out.print (""); } return mumap.get (muaction); } public HashMap <String, Integer> getnparams (String process) { return this.mapnparams.get(process); } public Integer getnparams (String process, String muaction) { HashMap <String, Integer> mumap = this.mapnparams.get(process); if (mumap == null) { System.out.print (""); } return mumap.get (muaction); } public boolean containsKey (String process, String muaction) { boolean b1 = this.mapmu.get(process) != null; if (b1) { boolean b2 = this.mapmu.get(process).get(muaction) != null; return b2; } return false; } } |