ikrs.yuccasrv
Interface ConnectionUserID<T extends ConnectionUserID>

All Superinterfaces:
java.lang.Comparable<T>
All Known Implementing Classes:
TCPConnectionUserID, UDPConnectionUserID

public interface ConnectionUserID<T extends ConnectionUserID>
extends java.lang.Comparable<T>

The connection user ID is a wrapper class that holds essential data that is required to identify a single when connecting. The idea is that on a later reconnect the connected user still has the same connection ID (unless the IP changed). Note that this object is not meant for information retrieval but only for comparison.


Method Summary
 int compareTo(T userID)
          This method compares this connection user ID with the given ID.
 boolean equals(java.lang.Object o)
          This method compares this connection user ID with the given object.
 boolean equals(T userID)
          This method compares this connection user ID with the given ID.
 

Method Detail

equals

boolean equals(java.lang.Object o)
This method compares this connection user ID with the given object.

Overrides:
equals in class java.lang.Object
Returns:
true if and only if this and the given object are equal.
See Also:
java.lang.Object.equals( Object )

equals

boolean equals(T userID)
This method compares this connection user ID with the given ID.

Returns:
true if and only if this and the given ID are equal.
See Also:
java.lang.Object.equals( Object )

compareTo

int compareTo(T userID)
This method compares this connection user ID with the given ID. If this ID is 'smaller' than the passed ID, the method returns a negative integer. If this ID is 'bigger' than the passed ID, the method returns a positive integer. If this ID equals the passed ID, the method returns 0.

Specified by:
compareTo in interface java.lang.Comparable<T extends ConnectionUserID>
Returns:
A value indicating the order of the two ID.
See Also:
equals( ConnectionUserID )