Interface Group.Builder

Enclosing interface:
Group

public static interface Group.Builder
  • Method Details

    • setId

      Group.Builder setId(@Nullable UUID id)
      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 or null if the ID should be randomly generated
      Returns:
      the builder
    • setName

      Group.Builder setName(String name)
      NOTE: The name might be stripped of special characters and whitespace.
      Parameters:
      name - the name of the group
      Returns:
      the builder
    • setPassword

      Group.Builder setPassword(@Nullable String password)
      Parameters:
      password - the group password
      Returns:
      the builder
    • setPersistent

      Group.Builder setPersistent(boolean persistent)
      Parameters:
      persistent - if the group should be persistent
      Returns:
      the builder
    • setHidden

      Group.Builder setHidden(boolean hidden)
      Parameters:
      hidden - if the group should be hidden in the group list UI
      Returns:
      the builder
    • setType

      Group.Builder setType(Group.Type type)
      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