This repository has been archived on 2021-12-05. You can view files and clone it, but cannot push or open issues or pull requests.
envoy/common/src/main/java/envoy/event/GroupCreation.java

38 lines
1.0 KiB
Java

package envoy.event;
import java.util.*;
import envoy.data.User;
/**
* This event creates a group with the given name.
*
* @author Leon Hofmeister
* @since Envoy Common v0.1-beta
*/
public final class GroupCreation extends Event<String> {
private final Set<Long> initialMemberIDs;
private static final long serialVersionUID = 0L;
/**
* @param name the name of this group at creation time
* @param initialMemberIDs the IDs of all {@link User}s that should be group
* members from the beginning on (excluding the creator
* of this group)
* @since Envoy Common v0.1-beta
*/
public GroupCreation(String name, Set<Long> initialMemberIDs) {
super(name);
this.initialMemberIDs = initialMemberIDs != null ? initialMemberIDs : new HashSet<>();
}
/**
* @return the IDs of all {@link User}s that are members from the beginning
* (excluding the creator of this group)
* @since Envoy Common v0.1-beta
*/
public Set<Long> getInitialMemberIDs() { return initialMemberIDs; }
}