Package com.itextpdf.text.io
Class PagedChannelRandomAccessSource.MRU<E>
- java.lang.Object
-
- com.itextpdf.text.io.PagedChannelRandomAccessSource.MRU<E>
-
- Enclosing class:
- PagedChannelRandomAccessSource
private static class PagedChannelRandomAccessSource.MRU<E> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MRU(int limit)
Constructs an MRU with the specified size
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
enqueue(E newElement)
Adds an element to the MRU.
-
-
-
Field Detail
-
limit
private final int limit
The maximum number of entries held by this MRU
-
queue
private java.util.LinkedList<E> queue
Backing list for managing the MRU
-
-
Method Detail
-
enqueue
public E enqueue(E newElement)
Adds an element to the MRU. If the element is already in the MRU, it is moved to the top.- Parameters:
newElement
- the element to add- Returns:
- the element that was removed from the MRU to make room for the new element, or null if no element needed to be removed
-
-