public class MetaserverEntry extends java.lang.Object implements java.lang.Comparable<MetaserverEntry>
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
archBase
The server's arch base.
|
private long |
bytesIn
The number of bytes received.
|
private long |
bytesOut
The number of bytes sent.
|
private java.lang.String |
codeBase
The server's code base.
|
private java.lang.String |
comment
Returns the server comment.
|
private java.lang.String |
hostname
The hostname.
|
private static java.util.regex.Pattern |
HTML_TAG_MATCHER
Matches html tags.
|
private java.lang.String |
mapBase
The server's map base.
|
private int |
players
The number of players.
|
private int |
updateSeconds
Time since last update in seconds.
|
private int |
uptimeSeconds
The server's uptime in seconds.
|
private java.lang.String |
version
Returns the server version.
|
Constructor and Description |
---|
MetaserverEntry(int updateSeconds,
java.lang.String hostname,
int players,
java.lang.String version,
java.lang.String comment,
long bytesIn,
long bytesOut,
int uptimeSeconds,
java.lang.String archBase,
java.lang.String mapBase,
java.lang.String codeBase)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(MetaserverEntry o) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
format(java.lang.String format)
Returns a formatted string using the given format.
|
java.lang.String |
getArchBase()
Returns the server's arch base.
|
long |
getBytesIn()
Returns the number of bytes received.
|
long |
getBytesOut()
Returns the number of bytes sent.
|
java.lang.String |
getCodeBase()
Returns the server's code base.
|
java.lang.String |
getComment()
Returns the server comment.
|
java.lang.String |
getHostname()
Returns the hostname.
|
java.lang.String |
getMapBase()
Returns the server's map base.
|
int |
getPlayers()
Returns the number of players.
|
int |
getUpdateSeconds()
Returns the time since last update in seconds.
|
int |
getUptimeSeconds()
Returns the server's uptime in seconds.
|
java.lang.String |
getVersion()
Returns the server version.
|
int |
hashCode() |
java.lang.String |
toString() |
@NotNull private final java.lang.String archBase
private final long bytesIn
private final long bytesOut
@NotNull private final java.lang.String codeBase
@NotNull private final java.lang.String comment
@NotNull private final java.lang.String hostname
@NotNull private static final java.util.regex.Pattern HTML_TAG_MATCHER
@NotNull private final java.lang.String mapBase
private final int players
private final int updateSeconds
private final int uptimeSeconds
@NotNull private final java.lang.String version
public MetaserverEntry(int updateSeconds, @NotNull java.lang.String hostname, int players, @NotNull java.lang.String version, @NotNull java.lang.String comment, long bytesIn, long bytesOut, int uptimeSeconds, @NotNull java.lang.String archBase, @NotNull java.lang.String mapBase, @NotNull java.lang.String codeBase)
updateSeconds
- time since last update in secondshostname
- the hostnameplayers
- the number of playersversion
- the server versioncomment
- the server commentbytesIn
- the number of bytes receivedbytesOut
- the number of bytes sentuptimeSeconds
- the server's uptime in secondsarchBase
- the server's arch basemapBase
- the server's map basecodeBase
- the server's code basepublic int compareTo(@NotNull MetaserverEntry o)
compareTo
in interface java.lang.Comparable<MetaserverEntry>
public boolean equals(@Nullable java.lang.Object obj)
equals
in class java.lang.Object
@NotNull public java.lang.String format(@NotNull java.lang.String format)
Supported format strings:
format
- the format@NotNull public java.lang.String getArchBase()
public long getBytesIn()
public long getBytesOut()
@NotNull public java.lang.String getCodeBase()
@NotNull public java.lang.String getComment()
@NotNull public java.lang.String getHostname()
@NotNull public java.lang.String getMapBase()
public int getPlayers()
public int getUpdateSeconds()
public int getUptimeSeconds()
@NotNull public java.lang.String getVersion()
public int hashCode()
hashCode
in class java.lang.Object
@NotNull public java.lang.String toString()
toString
in class java.lang.Object