本文整理汇总了Java中org.jivesoftware.smack.RosterGroup.getName方法的典型用法代码示例。如果您正苦于以下问题:Java RosterGroup.getName方法的具体用法?Java RosterGroup.getName怎么用?Java RosterGroup.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jivesoftware.smack.RosterGroup
的用法示例。
在下文中一共展示了RosterGroup.getName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ParcelableRoster
import org.jivesoftware.smack.RosterGroup; //导入方法依赖的package包/类
public ParcelableRoster(RosterEntry entry, Presence presence) {
if(entry != null) {
// entry data 파싱
this.userID = entry.getUser();
this.userName = entry.getName();
for(RosterGroup rosterGroup : entry.getGroups()) { this.group = rosterGroup.getName(); }
}
if(presence != null) {
// 접속상태 확인
this.availablity = presence.getType().toString();
if(availablity.equals("available")) parseStatusString( presence.getStatus() );
if(presence.getMode() != null) this.mode = presence.getMode().toString();
}
}
示例2: getGroup
import org.jivesoftware.smack.RosterGroup; //导入方法依赖的package包/类
/**
* 遍历获取组名
*
* @param groups
* @return
*/
private String getGroup(Collection<RosterGroup> groups) {
for (RosterGroup group : groups) {
return group.getName();
}
return "";
}
示例3: rosterGroup2BuddyGroup
import org.jivesoftware.smack.RosterGroup; //导入方法依赖的package包/类
public BuddyGroup rosterGroup2BuddyGroup(RosterGroup entry, Collection<RosterEntry> buddies, String ownerUid, Context context, byte serviceId){
if (entry == null){
return null;
}
BuddyGroup group = new BuddyGroup(entry.getName(), ownerUid, serviceId);
group.setName(entry.getName());
for (RosterEntry buddy: entry.getEntries()){
buddies.remove(buddy);
group.getBuddyList().add(rosterEntry2Buddy(buddy, ownerUid, context, serviceId));
}
return group;
}
示例4: rosterGroup2BuddyGroup
import org.jivesoftware.smack.RosterGroup; //导入方法依赖的package包/类
@Override
public BuddyGroup rosterGroup2BuddyGroup(RosterGroup entry, Collection<RosterEntry> buddies, String ownerUid, Context context, byte serviceId){
if (entry == null){
return null;
}
BuddyGroup group = new BuddyGroup(entry.getName(), ownerUid, serviceId);
group.setName(entry.getName());
for (RosterEntry buddy: entry.getEntries()){
buddies.remove(buddy);
group.getBuddyList().add(rosterEntry2Buddy(buddy, ownerUid, context, serviceId));
}
return group;
}
示例5: getGroup
import org.jivesoftware.smack.RosterGroup; //导入方法依赖的package包/类
private String getGroup(Collection<RosterGroup> groups) {
for (RosterGroup group : groups) {
return group.getName();
}
return "";
}