List of usage examples for org.apache.commons.collections4.keyvalue MultiKey size
public int size()
From source file:org.apache.openmeetings.web.app.Application.java
public static boolean isUserOnline(Long userId) { MapIterator<MultiKey<? extends String>, org.apache.openmeetings.web.app.Client> it = ONLINE_USERS .mapIterator();//from w ww. ja va2 s. c o m boolean isUserOnline = false; while (it.hasNext()) { MultiKey<? extends String> multi = it.next(); if (multi.size() > 0 && userId.equals(multi.getKey(0))) { isUserOnline = true; break; } } return isUserOnline; }
From source file:org.apache.openmeetings.web.app.Application.java
public static List<org.apache.openmeetings.web.app.Client> getClients(Long userId) { List<org.apache.openmeetings.web.app.Client> result = new ArrayList<org.apache.openmeetings.web.app.Client>(); MapIterator<MultiKey<? extends String>, org.apache.openmeetings.web.app.Client> it = ONLINE_USERS .mapIterator();/*from w w w . j a v a 2 s. co m*/ while (it.hasNext()) { MultiKey<? extends String> multi = it.next(); if (multi.size() > 1 && userId.equals(multi.getKey(0))) { result.add(getClientByKeys(userId, (String) (multi.getKey(1)))); break; } } return result; }