Package com.itextpdf.io.source
Class PagedChannelRandomAccessSource.MRU<E>
java.lang.Object
com.itextpdf.io.source.PagedChannelRandomAccessSource.MRU<E>
- Enclosing class:
PagedChannelRandomAccessSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
The maximum number of entries held by this MRUprivate LinkedList
<E> Backing list for managing the MRU -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
limit
private final int limitThe maximum number of entries held by this MRU -
queue
Backing list for managing the MRU
-
-
Constructor Details
-
MRU
public MRU(int limit) Constructs an MRU with the specified size- Parameters:
limit
- the limit
-
-
Method Details
-
enqueue
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
-