Package com.smartfoxserver.buddylist
Class SFSBuddyList
java.lang.Object
com.smartfoxserver.buddylist.SFSBuddyList
- All Implemented Interfaces:
BuddyList
An SFSBuddyList represents one BuddyList in the Buddy System.
BuddyLists are managed by a SFSBuddyListManager which is a component of the SFSZone
-
Constructor Summary
ConstructorsConstructorDescriptionSFSBuddyList(String ownerName) SFSBuddyList(String ownerName, BuddyListManager buddyListManager) -
Method Summary
Modifier and TypeMethodDescriptionUsed by the BuddyManager only.voidclearAll()booleancontainsBuddy(String buddyName) Checks if a Buddy is contained in the BuddyListGet a list of all Buddies in the BuddyListGet a Buddy from the BuddyList by nameGet a reference to the BuddyManager managing this BuddyListgetOwner()Get the User that owns this BuddyListGet the name of the owner of this BuddyListintObtain the size of the BuddyList, including the temp buddiesintgetSize()Obtain the size of the BuddyList.booleanisBuddyBlocked(String buddyName) Checks whether the specified Buddy is blocked in this BuddyListbooleanisEmpty()Checks if the BuddyList is emptybooleanisFull()Checks if the BuddyList is fullremoveBuddy(String buddyName) Used by the BuddyManager only.voidsetBuddyListManager(BuddyListManager buddyListManager) toString()
-
Constructor Details
-
SFSBuddyList
-
SFSBuddyList
-
-
Method Details
-
addBuddy
Description copied from interface:BuddyListUsed by the BuddyManager only.
If you want to add a Buddy to User's list please use the BuddyAPI- Specified by:
addBuddyin interfaceBuddyList- Throws:
SFSBuddyListException- See Also:
-
removeBuddy
Description copied from interface:BuddyListUsed by the BuddyManager only.
If you want to remove a Buddy from the User's list please use the BuddyAPI.- Specified by:
removeBuddyin interfaceBuddyList- See Also:
-
containsBuddy
Description copied from interface:BuddyListChecks if a Buddy is contained in the BuddyList- Specified by:
containsBuddyin interfaceBuddyList- Parameters:
buddyName- the Buddy name- Returns:
- true if the list contains a Buddy with the provided name
-
isBuddyBlocked
Description copied from interface:BuddyListChecks whether the specified Buddy is blocked in this BuddyList- Specified by:
isBuddyBlockedin interfaceBuddyList- Parameters:
buddyName- the name of the Buddy- Returns:
- true if the Buddy is blocked
-
getSize
public int getSize()Description copied from interface:BuddyListObtain the size of the BuddyList. The returned value does not count the temporary Buddies -
getRuntimeSize
public int getRuntimeSize()Description copied from interface:BuddyListObtain the size of the BuddyList, including the temp buddies- Specified by:
getRuntimeSizein interfaceBuddyList- Returns:
- the size of the BuddyList
-
isEmpty
public boolean isEmpty()Description copied from interface:BuddyListChecks if the BuddyList is empty -
isFull
public boolean isFull()Description copied from interface:BuddyListChecks if the BuddyList is full -
clearAll
public void clearAll() -
getBuddy
Description copied from interface:BuddyListGet a Buddy from the BuddyList by name -
getBuddies
Description copied from interface:BuddyListGet a list of all Buddies in the BuddyList- Specified by:
getBuddiesin interfaceBuddyList- Returns:
- all the Buddy objects in the BuddyList
-
getBuddyListManager
Description copied from interface:BuddyListGet a reference to the BuddyManager managing this BuddyList- Specified by:
getBuddyListManagerin interfaceBuddyList- Returns:
- a the BuddyManager
-
setBuddyListManager
- Specified by:
setBuddyListManagerin interfaceBuddyList
-
getOwnerName
Description copied from interface:BuddyListGet the name of the owner of this BuddyList- Specified by:
getOwnerNamein interfaceBuddyList- Returns:
- the owner's name
-
getOwner
Description copied from interface:BuddyListGet the User that owns this BuddyList -
toSFSArray
- Specified by:
toSFSArrayin interfaceBuddyList
-
toString
-