Class CharacterIdChannelPair
java.lang.Object
handling.world.CharacterIdChannelPair
- All Implemented Interfaces:
Externalizable, Serializable, Comparable<CharacterIdChannelPair>
public class CharacterIdChannelPair
extends Object
implements Externalizable, Comparable<CharacterIdChannelPair>
角色 ID 與所在頻道編號的輕量配對值物件。
用於跨頻道查詢角色位置時的回傳結果,封裝一對 (charid, channel) 並實作
Externalizable 以支援序列化傳輸。實作 Comparable 依頻道號排序,
供 World.Find 等跨伺服器查詢組裝有序結果集使用。
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintintvoidvoid
-
Constructor Details
-
CharacterIdChannelPair
public CharacterIdChannelPair()only for externalisation -
CharacterIdChannelPair
public CharacterIdChannelPair(int charid, int channel)
-
-
Method Details
-
getCharacterId
public int getCharacterId() -
getChannel
public int getChannel() -
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
compareTo
- Specified by:
compareToin interfaceComparable<CharacterIdChannelPair>
-