Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jcsq.serverinfo
Class ServerInfo  view ServerInfo download ServerInfo.java

java.lang.Object
  extended byjcsq.serverinfo.ServerInfo
All Implemented Interfaces:
java.lang.Cloneable

public class ServerInfo
extends java.lang.Object
implements java.lang.Cloneable

Container for the info of current server.


Field Summary
private  java.lang.StringBuffer descriptionBuffer
           
private  java.lang.StringBuffer dirBuffer
           
private  java.lang.StringBuffer hostAddressBuffer
           
private  java.lang.StringBuffer infoBuffer
           
private  java.lang.String ip
           
private  java.lang.StringBuffer mapBuffer
           
private  byte maxPlayers
           
private  java.lang.StringBuffer nameBuffer
           
private  byte players
           
private  int port
           
private  byte protocolVersion
           
private  boolean to
           
 
Constructor Summary
ServerInfo()
           
 
Method Summary
 java.lang.Object clone()
          This method may be called to create a new copy of the Object.
 java.lang.String getDescription()
           
 java.lang.String getGameInfoString()
           
 java.lang.String getIp()
           
 java.lang.String getMap()
           
 byte getMaxPlayers()
           
 byte getPlayers()
           
 int getPort()
           
 byte getProtocolVersion()
           
 java.lang.String getServerName()
           
 boolean isEmpty()
           
 boolean isFull()
           
 void setDescription(byte b)
           
 void setDir(byte b)
           
 void setGameInfoString(byte b)
           
 void setHostAddress(byte b)
           
 void setIp(java.lang.String ip)
           
 void setMap(byte b)
           
 void setMaxPlayers(byte b)
           
 void setName(byte b)
           
 void setPlayers(byte b)
           
 void setPort(int port)
           
 void setProtocolVersion(byte b)
           
 void setTimedOut(boolean b)
           
 boolean timedOut()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ip

private java.lang.String ip

to

private boolean to

players

private byte players

maxPlayers

private byte maxPlayers

protocolVersion

private byte protocolVersion

port

private int port

hostAddressBuffer

private java.lang.StringBuffer hostAddressBuffer

nameBuffer

private java.lang.StringBuffer nameBuffer

mapBuffer

private java.lang.StringBuffer mapBuffer

infoBuffer

private java.lang.StringBuffer infoBuffer

dirBuffer

private java.lang.StringBuffer dirBuffer

descriptionBuffer

private java.lang.StringBuffer descriptionBuffer
Constructor Detail

ServerInfo

public ServerInfo()
Method Detail

setHostAddress

public void setHostAddress(byte b)

setMap

public void setMap(byte b)

setName

public void setName(byte b)

setGameInfoString

public void setGameInfoString(byte b)

setDir

public void setDir(byte b)

setDescription

public void setDescription(byte b)

getMap

public java.lang.String getMap()

getServerName

public java.lang.String getServerName()

getDescription

public java.lang.String getDescription()

getGameInfoString

public java.lang.String getGameInfoString()

setMaxPlayers

public void setMaxPlayers(byte b)

getMaxPlayers

public byte getMaxPlayers()

setPlayers

public void setPlayers(byte b)

setProtocolVersion

public void setProtocolVersion(byte b)

getProtocolVersion

public byte getProtocolVersion()

getPlayers

public byte getPlayers()

getPort

public int getPort()

setPort

public void setPort(int port)

isFull

public boolean isFull()

isEmpty

public boolean isEmpty()

timedOut

public boolean timedOut()

setTimedOut

public void setTimedOut(boolean b)

setIp

public void setIp(java.lang.String ip)

getIp

public java.lang.String getIp()

clone

public java.lang.Object clone()
Description copied from class: java.lang.Object
This method may be called to create a new copy of the Object. The typical behavior is as follows:
  • o == o.clone() is false
  • o.getClass() == o.clone().getClass() is true
  • o.equals(o) is true

However, these are not strict requirements, and may be violated if necessary. Of the three requirements, the last is the most commonly violated, particularly if the subclass does not override Object.equals(Object)>Object.equals(Object) 55 .

If the Object you call clone() on does not implement java.lang.Cloneable (which is a placeholder interface), then a CloneNotSupportedException is thrown. Notice that Object does not implement Cloneable; this method exists as a convenience for subclasses that do.

Object's implementation of clone allocates space for the new Object using the correct class, without calling any constructors, and then fills in all of the new field values with the old field values. Thus, it is a shallow copy. However, subclasses are permitted to make a deep copy.

All array types implement Cloneable, and override this method as follows (it should never fail):

 public Object clone()
 {
   try
     {
       super.clone();
     }
   catch (CloneNotSupportedException e)
     {
       throw new InternalError(e.getMessage());
     }
 }