7 package com.google.appinventor.components.runtime.util;
9 import java.util.ArrayList;
10 import java.util.HashMap;
11 import java.util.List;
21 private String instanceId;
22 private String leader;
25 private List<String> players;
43 players =
new ArrayList<String>(0);
44 messageTimes =
new HashMap<String, String>();
45 this.instanceId = instanceId;
85 if (newPlayersList.equals(players)) {
88 List<String> removed = players;
89 List<String> added =
new ArrayList<String>(newPlayersList);
90 players =
new ArrayList<String>(newPlayersList);
92 added.removeAll(removed);
93 removed.removeAll(newPlayersList);
96 if (added.size() == 0 && removed.size() == 0) {
124 if (messageTimes.containsKey(type)) {
125 return messageTimes.get(type);
143 messageTimes.put(type, time);