lilypad.client.connect.api.result.impl
Class GetPlayersResult

java.lang.Object
  extended by lilypad.client.connect.api.result.Result
      extended by lilypad.client.connect.api.result.impl.GetPlayersResult

public class GetPlayersResult
extends Result


Constructor Summary
GetPlayersResult(int currentPlayers, int maximumPlayers, java.util.Set<java.lang.String> players)
          Showing the result was successful, passing the data to accompany the result.
GetPlayersResult(StatusCode statusCode)
          Called only when the result is unsuccessful.
 
Method Summary
 int getCurrentPlayers()
          An accurate representation of the current player count as reported by the network
 int getMaximumPlayers()
          The maximum players allowed on the network.
 java.util.Set<java.lang.String> getPlayers()
          If the original request asked for the list of players, an accurate representation of all players on the network will be returned.
 
Methods inherited from class lilypad.client.connect.api.result.Result
getStatusCode
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetPlayersResult

public GetPlayersResult(StatusCode statusCode)
Called only when the result is unsuccessful.

Parameters:
statusCode - of the result

GetPlayersResult

public GetPlayersResult(int currentPlayers,
                        int maximumPlayers,
                        java.util.Set<java.lang.String> players)
Showing the result was successful, passing the data to accompany the result.

Parameters:
currentPlayers -
maximumPlayers -
players -
Method Detail

getCurrentPlayers

public int getCurrentPlayers()
An accurate representation of the current player count as reported by the network

Returns:
current players

getMaximumPlayers

public int getMaximumPlayers()
The maximum players allowed on the network. This is normally calculated through the sum of all proxies' maximum player count, however when at least one proxies' player count is below 2, it will return the single proxies' player count instead

Returns:
max players

getPlayers

public java.util.Set<java.lang.String> getPlayers()
If the original request asked for the list of players, an accurate representation of all players on the network will be returned. Otherwise, it will return null.

Returns:
set of players