Lines Matching refs:capacity
34 * buffer are its capacity, limit, and position: </p>
38 * <p> A buffer's <i>capacity</i> is the number of elements it contains. The
39 * capacity of a buffer is never negative and never changes. </p>
43 * greater than its capacity. </p>
94 * capacity values:
101 * <i>capacity</i>
113 * <p> In addition to methods for accessing the position, limit, and capacity
121 * capacity and the position to zero. </p></li>
176 // Invariants: mark <= position <= limit <= capacity
180 private int capacity;
186 // Creates a new buffer with the given mark, position, limit, and capacity,
191 throw new IllegalArgumentException("Negative capacity: " + cap);
192 this.capacity = cap;
204 * Returns this buffer's capacity. </p>
206 * @return The capacity of this buffer
208 public final int capacity() {
209 return capacity;
258 * and no larger than this buffer's capacity
266 if ((newLimit > capacity) || (newLimit < 0))
305 * the capacity, and the mark is discarded.
322 limit = capacity;
550 capacity = 0;