Class BuddylistEntry
java.lang.Object
client.BuddylistEntry
好友清單中單筆好友記錄的資料容器。
持有一位好友的基本資訊:角色 ID(cid)、名稱(name)、
群組名稱(group)、目前所在頻道(channel,離線時為 -1)
以及可見性旗標(visible,代表對方是否已接受好友邀請)。
由 BuddyList 以角色 ID 為鍵管理;hashCode() 與
equals(Object) 僅依 cid 判等,以確保同一角色不重複出現。
-
Constructor Summary
ConstructorsConstructorDescriptionBuddylistEntry(String name, int characterId, String group, int channel, boolean visible) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintintgetGroup()getName()inthashCode()booleanisOnline()booleanvoidsetChannel(int channel) voidvoidvoidsetVisible(boolean visible)
-
Constructor Details
-
BuddylistEntry
-
-
Method Details
-
getChannel
public int getChannel()- Returns:
- the channel the character is on. If the character is offline returns -1.
-
setChannel
public void setChannel(int channel) -
isOnline
public boolean isOnline() -
setOffline
public void setOffline() -
getName
-
getCharacterId
public int getCharacterId() -
setVisible
public void setVisible(boolean visible) -
isVisible
public boolean isVisible() -
getGroup
-
setGroup
-
hashCode
-
equals
-