diff options
-rw-r--r-- | src/jrummikub/util/Pair.java | 18 | ||||
-rw-r--r-- | src/jrummikub/view/IBoard.java | 3 | ||||
-rw-r--r-- | src/jrummikub/view/IClickable.java | 3 | ||||
-rw-r--r-- | src/jrummikub/view/IPlayerPanel.java | 5 | ||||
-rw-r--r-- | src/jrummikub/view/IStoneCollection.java | 3 | ||||
-rw-r--r-- | src/jrummikub/view/ITable.java | 3 | ||||
-rw-r--r-- | src/jrummikub/view/IView.java | 3 |
7 files changed, 35 insertions, 3 deletions
diff --git a/src/jrummikub/util/Pair.java b/src/jrummikub/util/Pair.java index 5fb8589..76eea4f 100644 --- a/src/jrummikub/util/Pair.java +++ b/src/jrummikub/util/Pair.java @@ -2,20 +2,34 @@ package jrummikub.util; /** * A pair of objects + * @param <T1> the first type of the pair + * @param <T2> the second type of the pair */ public class Pair<T1, T2> { - final T1 first; - final T2 second; + private final T1 first; + private final T2 second; + /** + * Create a new pair + * + * @param first the first value + * @param second the second value + */ public Pair(T1 first, T2 second) { this.first = first; this.second = second; } + /** + * @return the first value + */ public T1 getFirst() { return first; } + /** + * @return the first value + */ public T2 getSecond() { return second; } diff --git a/src/jrummikub/view/IBoard.java b/src/jrummikub/view/IBoard.java index 0816937..1424dff 100644 --- a/src/jrummikub/view/IBoard.java +++ b/src/jrummikub/view/IBoard.java @@ -5,6 +5,9 @@ import java.util.Map; import jrummikub.model.Position; import jrummikub.model.Stone; +/** + * The view for a player's board that displayed his stones + */ public interface IBoard extends IClickable { /** * Set the player's stones to display on the board diff --git a/src/jrummikub/view/IClickable.java b/src/jrummikub/view/IClickable.java index 818e4fa..c827042 100644 --- a/src/jrummikub/view/IClickable.java +++ b/src/jrummikub/view/IClickable.java @@ -3,6 +3,9 @@ package jrummikub.view; import jrummikub.model.Position; import jrummikub.util.IEvent2; +/** + * An interface for view elements that can emit click events + */ public interface IClickable { /** * the click event is emitted when the player clicks on the table/board/etc. diff --git a/src/jrummikub/view/IPlayerPanel.java b/src/jrummikub/view/IPlayerPanel.java index 4cddfa4..e39ab65 100644 --- a/src/jrummikub/view/IPlayerPanel.java +++ b/src/jrummikub/view/IPlayerPanel.java @@ -2,9 +2,12 @@ package jrummikub.view; import jrummikub.util.IEvent; +/** + * The player panel that contains a player's board and other user interfaces + */ public interface IPlayerPanel { /** - * @return + * @return the board where the players hand stones are displayed */ public IBoard getBoard(); diff --git a/src/jrummikub/view/IStoneCollection.java b/src/jrummikub/view/IStoneCollection.java index 2ef9c79..8b4148d 100644 --- a/src/jrummikub/view/IStoneCollection.java +++ b/src/jrummikub/view/IStoneCollection.java @@ -1,4 +1,7 @@ package jrummikub.view; +/** + * The view of the collection that shows the stones a player has selected + */ public interface IStoneCollection extends IClickable { } diff --git a/src/jrummikub/view/ITable.java b/src/jrummikub/view/ITable.java index 258263a..e257d26 100644 --- a/src/jrummikub/view/ITable.java +++ b/src/jrummikub/view/ITable.java @@ -5,6 +5,9 @@ import java.util.Map; import jrummikub.model.Position; import jrummikub.model.StoneSet; +/** + * The view of the table, where the stone sets lie + */ public interface ITable extends IClickable { /** * Sets the player name on the left label diff --git a/src/jrummikub/view/IView.java b/src/jrummikub/view/IView.java index 419a2c1..25ebb32 100644 --- a/src/jrummikub/view/IView.java +++ b/src/jrummikub/view/IView.java @@ -4,6 +4,9 @@ import java.util.Collection; import jrummikub.model.Stone; +/** + * The top-level view interface + */ public interface IView { /** * Returns the table |