Lines Matching defs:limit

28  * negative and not greater than the limit.</li>
30 * write elements from index zero to <code>limit - 1</code>. Accessing
37 * while changing the position, limit and mark of a read-only buffer is OK.</li>
59 * <code>limit - 1</code> is the last element that can be read or written.
62 int limit;
73 * and no greater than <code>limit</code>.
96 this.capacity = this.limit = capacity;
149 if (index < 0 || index >= limit) {
150 throw new IndexOutOfBoundsException("index=" + index + ", limit=" + limit);
158 if (index < 0 || index > limit - sizeOfType) {
159 throw new IndexOutOfBoundsException("index=" + index + ", limit=" + limit +
203 * the buffer, the value of the buffer limit is made equal to the capacity
211 limit = capacity;
218 * The limit is set to the current position, then the position is set to
226 limit = position;
243 * {@code position < limit}.
249 return position < limit;
273 * Returns the limit of this buffer.
275 * @return the limit of this buffer.
277 public final int limit() {
278 return limit;
282 * Sets the limit of this buffer.
287 * is set and is greater than the new limit, then it is cleared.
290 * the new limit, must not be negative and not greater than
296 public final Buffer limit(int newLimit) {
298 throw new IllegalArgumentException("Bad limit (capacity " + capacity + "): " + newLimit);
301 limit = newLimit;
339 * limit.
350 if (newPosition < 0 || newPosition > limit) {
351 throw new IllegalArgumentException("Bad position (limit " + limit + "): " + newPosition);
362 * {@code limit - position}.
367 return limit - position;
404 "[position=" + position + ",limit=" + limit + ",capacity=" + capacity + "]";