ymsg.network
Class YahooGroup

Object
  extended byYahooGroup

public class YahooGroup
extends Object

Represents a single group of users on the friends list.

Since:
1.0

Constructor Summary
YahooGroup()
           
 
Method Summary
 int getIndexOfFriend(String id)
          Returns the index of a given friend with the specified ID in this group.
 Vector getMembers()
          Returns the current membership of this group.
 String getName()
          Get the group name.
 boolean isOpen()
          Returns whether the group is currently open on the user interface.
 void setOpen(boolean b)
          Sets the open state of this group on the user interface.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

YahooGroup

public YahooGroup()
Method Detail

getName

public String getName()
Get the group name.

Returns:
Group name
Since:
1.0

isOpen

public boolean isOpen()
Returns whether the group is currently open on the user interface. The open status is not used by the API (as yet) but is the recommended way to determine whether the tree branch on the user interface which represents this group is open (showing) or close (collapsed).

Returns:
Group name
Since:
1.0
See Also:
setOpen(boolean b)

setOpen

public void setOpen(boolean b)
Sets the open state of this group on the user interface. The open status is not used by the API (as yet) but is the recommended way to determine whether the tree branch on the user interface which represents this group is open (showing) or close (collapsed).

Parameters:
b - true=open, false=closed
Since:
1.0
See Also:
isOpen()

getMembers

public Vector getMembers()
Returns the current membership of this group. The Vector object returned should be populated with one or more YahooUser objects, representing the users in the group at the time this method was called.

Note: this method makes a shallow clone of the internal membership array, and as such should be considered expensive.

Returns:
list of group members
Since:
1.0

getIndexOfFriend

public int getIndexOfFriend(String id)
Returns the index of a given friend with the specified ID in this group.

Parameters:
id - ID of friend
Returns:
Index of friend, or -1 if absent.
Since:
1.0

toString

public String toString()
Returns a string representation of this object.

Returns:
group as a string
Since:
1.0