peternameyakj
2025-04-29 acf1c75a32aa05f34d9d60b6ae3f3e052b532e9f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package project.monitor.pledgegalaxy;
 
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
 
public class PledgeLock {
    
    private static final Set<String> filter = Collections.synchronizedSet(new HashSet<String>());
 
    public static boolean add(String partyId) {
        if (!filter.add(partyId)) {
            return false;
        } else {
            return true;
        }
    }
 
    public static void remove(String partyId) {
        filter.remove(partyId);
    }
}