Example usage for org.apache.commons.collections.map LinkedMap remove

List of usage examples for org.apache.commons.collections.map LinkedMap remove

Introduction

In this page you can find the example usage for org.apache.commons.collections.map LinkedMap remove.

Prototype

public Object remove(int index) 

Source Link

Document

Removes the element at the specified index.

Usage

From source file:de.innovationgate.wgpublisher.webtml.portlet.TMLPortlet.java

protected static void addEventToQueue(PortletEvent event, HttpSession session) {

    LinkedMap events = getFiredEventsQueue(session);

    synchronized (events) {
        event.retrieveIndex();//w w  w  .j a  v a 2 s.  c  o m
        events.put(new Long(event.getIndex()), event);
        while (events.size() > EVENTQUEUE_MAX_SIZE) {
            events.remove(events.firstKey());
        }
    }

}