Lines Matching refs:stack
59 * A thread-safe stack-like data structure whose {@code push} method
60 * overwrites the oldest element in the stack if the stack is full.
64 * Array that holds the elements in the cyclic stack.
72 * If it is {@code null}, then the stack is empty and all
76 * the stack is empty. This means that when the first element is
78 * {@code refs} and the stack will start growing from there.
83 * Gets the most recently added element from the stack.
84 * If the stack is empty, {@code null} is returned.
94 * Adds a new element to the stack. If the stack is full, the oldest
133 * Returns true if the map is full and the least recently used stack
178 // Try to find a stack that holds arrays of T[size].
179 CyclicStack<Reference<T>> stack;
181 stack = cache.get(size);
184 if (stack == null)
187 // Try to find a non-cleared Reference from the stack.
190 Reference<T> r = stack.pop();
209 CyclicStack<Reference<T>> stack;
212 // Get a stack that holds arrays of T[size]. If no such stack
214 // number of stacks, the least recently used stack is removed by
216 stack = cache.get(size);
217 if (stack == null) {
218 stack = new CyclicStack<Reference<T>>();
219 cache.put(size, stack);
223 stack.push(new SoftReference<T>(array));