Betty v1.1.0

christophedelory.betty.xml
Class PlayersDetails

java.lang.Object
  extended by christophedelory.betty.xml.Child
      extended by christophedelory.betty.xml.PlayersDetails
All Implemented Interfaces:
XmlRoot, Serializable

public class PlayersDetails
extends Child
implements XmlRoot

A list of players.

Version:
$Revision$
Author:
Christophe Delory
See Also:
Serialized Form

Constructor Summary
PlayersDetails()
           
 
Method Summary
 void accept(XmlVisitor visitor)
          Accepts the specified XML visitor.
 void addPlayer(PlayerDetails player)
          Adds a player to this list.
 List<PlayerDetails> getPlayers()
          Returns the list of players.
 boolean hasPlayer(String playerId)
          Checks if this players list contains a player with the specified identifier.
 
Methods inherited from class christophedelory.betty.xml.Child
getParent, getRoot, getRoot, getVersion, setParent, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface christophedelory.betty.xml.XmlRoot
getVersion, setVersion
 

Constructor Detail

PlayersDetails

public PlayersDetails()
Method Detail

getPlayers

public List<PlayerDetails> getPlayers()
Returns the list of players.

Returns:
a list of players. May be empty but not null.
See Also:
addPlayer(PlayerDetails)

addPlayer

public void addPlayer(PlayerDetails player)
Adds a player to this list.

Parameters:
player - a player. Shall not be null.
Throws:
NullPointerException - if player is null.
See Also:
getPlayers()

hasPlayer

public boolean hasPlayer(String playerId)
Checks if this players list contains a player with the specified identifier.

Parameters:
playerId - a player identifier. May be null.
Returns:
true if a player with the specified identifier occurs in the list, false otherwise.

accept

public void accept(XmlVisitor visitor)
            throws Exception
Description copied from interface: XmlRoot
Accepts the specified XML visitor.

Specified by:
accept in interface XmlRoot
Parameters:
visitor - a visitor. Shall not be null.
Throws:
NullPointerException - if visitor is null.
Exception - if any error occurs during the visit.

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.