public static synchronized boolean pgIsContain(ProgramBean program) { if (globalAllPgs.size() == 0) return false; for (ProgramBean t : globalAllPgs) { if (t.getId().equals(program.getId())) { return true; } } return false; }
public static synchronized boolean pgRemove(String taskId) { if (globalAllPgs.size() == 0) return false; ; for (ProgramBean t : globalAllPgs) { if (t.getId().equals(taskId)) { globalAllPgs.remove(t); return true; } } return false; }