Java Reference
In-Depth Information
* Return a {@link Team} object that represents
* the team that this player is on.
* @return The {@link Team} for which this player plays
Team getTeam();
* Return the {@link Position} played by this player,
* which can be used to determine the roles that
* the player has.
* @return the {@link Position} of this player
Position getPosition();
* Set the {@link Position} of the player.
* @param pos the {@link Position} played
* by this player
void setPosition(Position pos);
* Return a {@link Batter} object if this player has the role of a
* Batter, otherwise returns null.
* @return a {@link Batter} object containing the batting statistics
* for this player.
Batter asBatter();
This gives a more complete idea of how the interface is supposed to be used, and what the
requirements are for implementations of the interface. We have not completed the interface
yet; there is only a single method to return a statistical object. There will need to be parallel
methods that return the other statistical objects added to the interface, a task we will turn to
The @link tag allows us to form a web link in our documentation, enabling the reader to nav-
igate to the related entries through the browser. But that isn't the only form of link that we can
Search WWH ::

Custom Search