Package com.smartfoxserver.buddylist
Interface BuddyList
- All Known Implementing Classes:
SFSBuddyList
public interface BuddyList
-
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)
-
Method Details
-
getOwnerName
String getOwnerName()Get the name of the owner of this BuddyList- Returns:
- the owner's name
-
getOwner
User getOwner()Get the User that owns this BuddyList- Returns:
- the BuddyList owner
-
getBuddyListManager
BuddyListManager getBuddyListManager()Get a reference to the BuddyManager managing this BuddyList- Returns:
- a the BuddyManager
-
setBuddyListManager
-
getBuddy
Get a Buddy from the BuddyList by name- Parameters:
buddyName- the name of the Buddy- Returns:
- the Buddy object or null if no Buddy exists with that name
-
getBuddies
Get a list of all Buddies in the BuddyList- Returns:
- all the Buddy objects in the BuddyList
-
addBuddy
Used by the BuddyManager only.
If you want to add a Buddy to User's list please use the BuddyAPI- Throws:
SFSBuddyListException- See Also:
-
removeBuddy
Used by the BuddyManager only.
If you want to remove a Buddy from the User's list please use the BuddyAPI.- See Also:
-
containsBuddy
Checks if a Buddy is contained in the BuddyList- Parameters:
buddyName- the Buddy name- Returns:
- true if the list contains a Buddy with the provided name
-
getSize
int getSize()Obtain the size of the BuddyList. The returned value does not count the temporary Buddies- Returns:
- the size of the BuddyList without counting the temporary Buddies
-
getRuntimeSize
int getRuntimeSize()Obtain the size of the BuddyList, including the temp buddies- Returns:
- the size of the BuddyList
-
isFull
boolean isFull()Checks if the BuddyList is full- Returns:
- true if the BuddyList is full
-
isEmpty
boolean isEmpty()Checks if the BuddyList is empty- Returns:
- true if the BuddyList is empty
-
isBuddyBlocked
Checks whether the specified Buddy is blocked in this BuddyList- Parameters:
buddyName- the name of the Buddy- Returns:
- true if the Buddy is blocked
-
clearAll
void clearAll() -
toSFSArray
ISFSArray toSFSArray()
-