Package tk.dmanstrator.connectfour.log
Class GameLogEntryBuilder
- java.lang.Object
-
- tk.dmanstrator.connectfour.log.GameLogEntryBuilder
-
public class GameLogEntryBuilder extends java.lang.ObjectBuilder class for theGameLogEntry.
-
-
Constructor Summary
Constructors Constructor Description GameLogEntryBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GameLogEntrybuild()Builds theGameLogEntry.GameLogEntryBuildersetMessage(java.lang.String message)Sets the message for the entry.GameLogEntryBuildersetPlayerNumber(int playerNumber)Sets the player number for the entry.GameLogEntryBuildersetRoundNumber(int roundNumber)Sets the round number for the entry.GameLogEntryBuildersetTitle(GameLogEntry.RoundTitle title)Sets theGameLogEntry.RoundTitlefor the entry.GameLogEntryBuildersetValidRound(boolean valid)Sets the validity of the round.
-
-
-
Method Detail
-
setMessage
public GameLogEntryBuilder setMessage(java.lang.String message)
Sets the message for the entry.- Parameters:
message- Message to set- Returns:
- The builder instance, useful for chaining
-
setTitle
public GameLogEntryBuilder setTitle(GameLogEntry.RoundTitle title)
Sets theGameLogEntry.RoundTitlefor the entry.- Parameters:
title-GameLogEntry.RoundTitleto set- Returns:
- The builder instance, useful for chaining
-
setValidRound
public GameLogEntryBuilder setValidRound(boolean valid)
Sets the validity of the round.- Parameters:
valid- Flag telling if valid of not.- Returns:
- The builder instance, useful for chaining
-
setRoundNumber
public GameLogEntryBuilder setRoundNumber(int roundNumber)
Sets the round number for the entry.- Parameters:
roundNumber- Round number to set- Returns:
- The builder instance, useful for chaining
-
setPlayerNumber
public GameLogEntryBuilder setPlayerNumber(int playerNumber)
Sets the player number for the entry.- Parameters:
playerNumber- Player number to set- Returns:
- The builder instance, useful for chaining
-
build
public GameLogEntry build()
Builds theGameLogEntry.- Returns:
- The built
GameLogEntry
-
-