diff options
author | jbion <joffrey.bion@amadeus.com> | 2016-12-21 22:19:47 +0100 |
---|---|---|
committer | jbion <joffrey.bion@amadeus.com> | 2016-12-21 22:19:47 +0100 |
commit | 0054c60e9711eda87a484bceea5349d7e6d93390 (patch) | |
tree | c4fbfb5ca988820be51907999ed67f80e52cf707 /src/main/java/org | |
parent | Add playerIndex and validation method to the Move itself (diff) | |
download | seven-wonders-0054c60e9711eda87a484bceea5349d7e6d93390.tar.gz seven-wonders-0054c60e9711eda87a484bceea5349d7e6d93390.tar.bz2 seven-wonders-0054c60e9711eda87a484bceea5349d7e6d93390.zip |
Add doc to Definition.create() to explicitly state the "no side-effect" requirement
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/luxons/sevenwonders/game/data/definitions/Definition.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/game/data/definitions/Definition.java b/src/main/java/org/luxons/sevenwonders/game/data/definitions/Definition.java index 15ecb255..6c6b4b19 100644 --- a/src/main/java/org/luxons/sevenwonders/game/data/definitions/Definition.java +++ b/src/main/java/org/luxons/sevenwonders/game/data/definitions/Definition.java @@ -11,5 +11,14 @@ import org.luxons.sevenwonders.game.Settings; */ public interface Definition<T> { + /** + * Creates a T object from the given settings. This method mustn't mutate this Definition as it may be called + * multiple times with different settings. + * + * @param settings + * the game settings to use to generate a game-specific object from this definition + * + * @return the new game-specific object created from this definition + */ T create(Settings settings); } |