org.eclipse.ecf.presence.roster
Class RosterEntry
java.lang.Object
org.eclipse.ecf.presence.roster.RosterItem
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.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
user
protected IUser user
presence
protected IPresence presence
groups
protected java.util.List groups
RosterEntry
public RosterEntry(IRosterItem parent,
IUser user,
IPresence presenceState)
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