Class MatrixBuilder
java.lang.Object
com.tnsai.coordination.groups.matrix.MatrixBuilder
Builder for creating MatrixOrganization instances.
Usage Example
MatrixOrganization matrix = MatrixOrganization.builder()
.name("Product Org")
.member(dev1)
.member(engLead)
.assign(dev1, "Engineering", engLead)
.build();
-
Method Summary
Modifier and TypeMethodDescriptionAssigns an agent to a dimension without a lead.Assigns an agent to a dimension with a lead.autoStart(boolean autoStart) Sets whether to auto-start after build.build()Builds the MatrixOrganization.description(String description) Sets the matrix description.Sets the matrix ID.member(com.tnsai.agents.Agent agent) Adds a member to the matrix.Sets the matrix name.policy(com.tnsai.agents.groups.GroupPolicy policy) Sets the group policy.
-
Method Details
-
id
Sets the matrix ID.- Parameters:
id- matrix ID- Returns:
- this builder
-
name
Sets the matrix name.- Parameters:
name- matrix name- Returns:
- this builder
-
description
Sets the matrix description.- Parameters:
description- matrix description- Returns:
- this builder
-
policy
Sets the group policy.- Parameters:
policy- policy- Returns:
- this builder
-
member
Adds a member to the matrix.- Parameters:
agent- agent to add- Returns:
- this builder
-
assign
public MatrixBuilder assign(com.tnsai.agents.Agent agent, String dimension, com.tnsai.agents.Agent lead) Assigns an agent to a dimension with a lead.- Parameters:
agent- agent to assigndimension- dimension namelead- dimension lead- Returns:
- this builder
-
assign
Assigns an agent to a dimension without a lead.- Parameters:
agent- agent to assigndimension- dimension name- Returns:
- this builder
-
autoStart
Sets whether to auto-start after build.- Parameters:
autoStart- auto-start flag- Returns:
- this builder
-
build
Builds the MatrixOrganization.- Returns:
- new MatrixOrganization instance
-