Package tk.dmanstrator.connectfour.log
Class GameLogEntryBuilder
- java.lang.Object
-
- tk.dmanstrator.connectfour.log.GameLogEntryBuilder
-
public class GameLogEntryBuilder extends java.lang.Object
Builder class for theGameLogEntry
.
-
-
Constructor Summary
Constructors Constructor Description GameLogEntryBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GameLogEntry
build()
Builds theGameLogEntry
.GameLogEntryBuilder
setMessage(java.lang.String message)
Sets the message for the entry.GameLogEntryBuilder
setPlayerNumber(int playerNumber)
Sets the player number for the entry.GameLogEntryBuilder
setRoundNumber(int roundNumber)
Sets the round number for the entry.GameLogEntryBuilder
setTitle(GameLogEntry.RoundTitle title)
Sets theGameLogEntry.RoundTitle
for the entry.GameLogEntryBuilder
setValidRound(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.RoundTitle
for the entry.- Parameters:
title
-GameLogEntry.RoundTitle
to 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
-
-