Package de.maxhenkel.voicechat.api
Interface Group.Builder
- Enclosing interface:
- Group
public static interface Group.Builder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
setHidden
(boolean hidden) Sets the ID of the group.NOTE: The name might be stripped of special characters and whitespace.setPassword
(String password) setPersistent
(boolean persistent) setType
(Group.Type type)
-
Method Details
-
setId
Sets the ID of the group. If this is not set, the ID will be randomly generated.
NOTE: If there is already a group with the same ID, the group will be overwritten.- Parameters:
id
- the group ID ornull
if the ID should be randomly generated- Returns:
- the builder
-
setName
NOTE: The name might be stripped of special characters and whitespace.- Parameters:
name
- the name of the group- Returns:
- the builder
-
setPassword
- Parameters:
password
- the group password- Returns:
- the builder
-
setPersistent
- Parameters:
persistent
- if the group should be persistent- Returns:
- the builder
-
setHidden
- Parameters:
hidden
- if the group should be hidden in the group list UI- Returns:
- the builder
-
setType
- Parameters:
type
- the group type- Returns:
- the builder
-
build
Group build()- Returns:
- the built group
- Throws:
IllegalStateException
- if the name is not set or invalid
-