org.eclipse.ecf.presence.roster
Class RosterEntry

java.lang.Object
  extended by org.eclipse.ecf.presence.roster.RosterItem
      extended by org.eclipse.ecf.presence.roster.RosterEntry
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IRosterEntry, IRosterItem

public class RosterEntry
extends RosterItem
implements IRosterEntry

Roster entry base class implementing IRosterEntry. Subclasses may be created as appropriate.


Field Summary
protected  java.util.List groups
           
protected  IPresence presence
           
protected  IUser user
           
 
Fields inherited from class org.eclipse.ecf.presence.roster.RosterItem
name, parent
 
Constructor Summary
RosterEntry(IRosterItem parent, IUser user, IPresence presenceState)
           
 
Method Summary
 boolean add(IRosterGroup group)
           
 boolean equals(java.lang.Object obj)
           
 java.util.Collection getGroups()
          Get groups associated with this roster entry.
 java.lang.String getName()
          Return name of item.
 IPresence getPresence()
          Get presence state for this roster entry.
 IUser getUser()
          Get user for this roster entry.
 int hashCode()
           
 boolean remove(IRosterGroup group)
           
 void setPresence(IPresence newPresence)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ecf.presence.roster.RosterItem
getAdapter, getParent, getRoster
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ecf.presence.roster.IRosterItem
getParent, getRoster
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

user

protected IUser user

presence

protected IPresence presence

groups

protected java.util.List groups
Constructor Detail

RosterEntry

public RosterEntry(IRosterItem parent,
                   IUser user,
                   IPresence presenceState)
Method Detail

setPresence

public void setPresence(IPresence newPresence)

getName

public java.lang.String getName()
Description copied from interface: IRosterItem
Return name of item.

Specified by:
getName in interface IRosterItem
Overrides:
getName in class RosterItem
Returns:
String name of item. May return null.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

add

public boolean add(IRosterGroup group)

remove

public boolean remove(IRosterGroup group)

getUser

public IUser getUser()
Description copied from interface: IRosterEntry
Get user for this roster entry. Will not be null.

Specified by:
getUser in interface IRosterEntry
Returns:
IUser that represents user associated with this roster entry. Will not be null.

getGroups

public java.util.Collection getGroups()
Description copied from interface: IRosterEntry
Get groups associated with this roster entry. Instance in list are of type IRosterGroup

Specified by:
getGroups in interface IRosterEntry
Returns:
Iterator of groups that this roster entry belongs to. Will not return null.

getPresence

public IPresence getPresence()
Description copied from interface: IRosterEntry
Get presence state for this roster entry.

Specified by:
getPresence in interface IRosterEntry
Returns:
IPresence information for this roster entry. May be null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object