private List<ClientSession> getNonNegativeSessions(List<ClientSession> sessions, int min) {
        if (min < 0) {
            return Collections.emptyList();
        }
        // Get sessions with priority >= min
        List<ClientSession> answer = new ArrayList<>(sessions.size());
        for (ClientSession session : sessions) {
            if (session.getPresence().getPriority() >= min) {
                answer.add(session);
            }
        }
        return answer;
    }
Gets the non-negative session from a minimal priority.

@param sessions The sessions.
@param min      The minimal priority.
@return The filtered sessions.
xmppserver/src/main/java/org/jivesoftware/openfire/spi/RoutingTableImpl.java