Java tutorial
//package com.java2s; import java.util.HashSet; import java.util.Set; public class Main { private static Set<Integer> delayedDeleteAlarms = new HashSet<>(); public static Set<Integer> getDelayedDeleteAlarms() { synchronized (delayedDeleteAlarms) { return new HashSet<>(delayedDeleteAlarms); } } }