public class RosterItem extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RosterItem.Subscription
Susbcription state.
|
Constructor and Description |
---|
RosterItem(BareJID jid,
SessionObject sessionObject) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
<T> T |
getData(String key)
Returns object stored by setData(String, Object).
|
ArrayList<String> |
getGroups()
Returns groups associated to roster item.
|
long |
getId()
Returns internal RosterItem object ID.
|
BareJID |
getJid()
Returns JID of buddy.
|
String |
getName()
Returns name of buddy.
|
SessionObject |
getSessionObject()
Returns session object related to roster item.
|
RosterItem.Subscription |
getSubscription()
Returns subscription state.
|
int |
hashCode() |
boolean |
isApproved() |
boolean |
isAsk()
Checks if subscription was requested.
|
<T> T |
removeData(String key)
Removes data stored by setData(String, Object).
|
void |
setApproved(boolean approved) |
void |
setAsk(boolean ask) |
void |
setData(String key,
Object value)
Store object in roster item.
|
void |
setName(String name) |
void |
setSubscription(RosterItem.Subscription subscription) |
String |
toString() |
public static final String ID_KEY
public RosterItem(BareJID jid, SessionObject sessionObject)
public <T> T getData(String key)
key
- the key whose associated value is to be returnednull
if object doesn't exists.public long getId()
public BareJID getJid()
public String getName()
public void setName(String name)
public SessionObject getSessionObject()
public RosterItem.Subscription getSubscription()
public void setSubscription(RosterItem.Subscription subscription)
public boolean isApproved()
public void setApproved(boolean approved)
public boolean isAsk()
true
subscription of this buddy was requested.public void setAsk(boolean ask)
public <T> T removeData(String key)
key
- the key whose associated value is to be removednull
if value was not saved.public void setData(String key, Object value)
key
- the key whose associated value is to be savedvalue
- values to saveCopyright © 2006–2023 Tigase. All rights reserved.