Blame view

circus/src/jcircus/complementaryenvs/ProcCreateMainEnv.java 877 Bytes
8d0dc533f   Madiel de Souza Conserva Filho   first
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
  package jcircus.complementaryenvs;
  
  import java.util.HashMap;
  import java.util.LinkedHashMap;
  
  public class ProcCreateMainEnv {
  	private HashMap <String, Boolean> map;
  	public ProcCreateMainEnv () {
  		map = new LinkedHashMap <String, Boolean> ();
  	}
  	public void update (String process, boolean createmain) {
  		if (this.map.containsKey(process)) {
  			this.map.remove(process);
  		}
  		this.map.put(process, createmain);
  	}
  	public String [] keys () {
  		Object [] keys = map.keySet().toArray();
  		String [] strkeys = new String [keys.length];
  		for (int i = 0; i < keys.length; i++) {
  			strkeys [i] = (String) keys [i];
  		}
  		return strkeys;
  	}
  	private void put (String process, boolean createmain) {
  		this.map.put(process, createmain);
  	}
  	public boolean get (String process) {
  		if (this.map.get(process) == null) {
  			return false;
  		}
  		return this.map.get (process);
  	}
  }