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 { private final Set 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 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 getInitialMemberIDs() { return initialMemberIDs; } }