/libcore/luni/src/main/java/libcore/reflect/ |
H A D | ListOfTypes.java | 30 ListOfTypes(int capacity) { argument 31 types = new ArrayList<Type>(capacity);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
H A D | WriterTest.java | 106 MockWriter(int capacity) { argument 107 contents = new char[capacity]; 108 length = capacity;
|
/libcore/ojluni/src/main/java/java/lang/ |
H A D | StringBuilder.java | 59 * Every string builder has a capacity. As long as the length of the 61 * the capacity, it is not necessary to allocate a new internal 87 * initial capacity of 16 characters. 95 * initial capacity specified by the {@code capacity} argument. 97 * @param capacity the initial capacity. 98 * @throws NegativeArraySizeException if the {@code capacity} 101 public StringBuilder(int capacity) { argument 102 super(capacity); [all...] |
H A D | StringBuffer.java | 76 * Every string buffer has a capacity. As long as the length of the 78 * the capacity, it is not necessary to allocate a new internal 113 * initial capacity of 16 characters. 121 * the specified initial capacity. 123 * @param capacity the initial capacity. 124 * @exception NegativeArraySizeException if the {@code capacity} 127 public StringBuffer(int capacity) { argument 128 super(capacity); 133 * specified string. The initial capacity o 167 public synchronized int capacity() { method in class:StringBuffer [all...] |
H A D | AbstractStringBuilder.java | 66 * Creates an AbstractStringBuilder of the specified capacity. 68 AbstractStringBuilder(int capacity) { argument 69 value = new char[capacity]; 84 * Returns the current capacity. The capacity is the amount of storage 88 * @return the current capacity 90 public int capacity() { method in class:AbstractStringBuilder 95 * Ensures that the capacity is at least equal to the specified minimum. 96 * If the current capacity is less than the argument, then a new internal 97 * array is allocated with greater capacity [all...] |
H A D | ProcessEnvironment.java | 101 static Map<String,String> emptyEnvironment(int capacity) { argument 102 return new StringEnvironment(new HashMap<Variable,Value>(capacity));
|
/libcore/ojluni/src/main/java/java/nio/ |
H A D | Buffer.java | 36 * buffer are its capacity, limit, and position: </p> 40 * <p> A buffer's <i>capacity</i> is the number of elements it contains. The 41 * capacity of a buffer is never negative and never changes. </p> 45 * greater than its capacity. </p> 96 * capacity values: 103 * <i>capacity</i> 115 * <p> In addition to methods for accessing the position, limit, and capacity 123 * capacity and the position to zero. </p></li> 185 // Invariants: mark <= position <= limit <= capacity 190 private int capacity; field in class:Buffer 230 public final int capacity() { method in class:Buffer [all...] |
H A D | DoubleBuffer.java | 105 // Creates a new buffer with the given mark, position, limit, capacity, 116 // Creates a new buffer with the given mark, position, limit, and capacity 127 * capacity, its mark will be undefined, and each of its elements will be 131 * @param capacity 132 * The new buffer's capacity, in doubles 137 * If the <tt>capacity</tt> is a negative integer 139 public static DoubleBuffer allocate(int capacity) { argument 140 if (capacity < 0) 142 return new HeapDoubleBuffer(capacity, capacity); [all...] |
H A D | FloatBuffer.java | 105 // Creates a new buffer with the given mark, position, limit, capacity, 116 // Creates a new buffer with the given mark, position, limit, and capacity 127 * capacity, its mark will be undefined, and each of its elements will be 131 * @param capacity 132 * The new buffer's capacity, in floats 137 * If the <tt>capacity</tt> is a negative integer 139 public static FloatBuffer allocate(int capacity) { argument 140 if (capacity < 0) 142 return new HeapFloatBuffer(capacity, capacity); [all...] |
H A D | IntBuffer.java | 106 // Creates a new buffer with the given mark, position, limit, capacity, 117 // Creates a new buffer with the given mark, position, limit, and capacity 128 * capacity, its mark will be undefined, and each of its elements will be 132 * @param capacity 133 * The new buffer's capacity, in ints 138 * If the <tt>capacity</tt> is a negative integer 140 public static IntBuffer allocate(int capacity) { argument 141 if (capacity < 0) 143 return new HeapIntBuffer(capacity, capacity); [all...] |
H A D | LongBuffer.java | 105 // Creates a new buffer with the given mark, position, limit, capacity, 116 // Creates a new buffer with the given mark, position, limit, and capacity 127 * capacity, its mark will be undefined, and each of its elements will be 131 * @param capacity 132 * The new buffer's capacity, in longs 137 * If the <tt>capacity</tt> is a negative integer 139 public static LongBuffer allocate(int capacity) { argument 140 if (capacity < 0) 142 return new HeapLongBuffer(capacity, capacity); [all...] |
H A D | ShortBuffer.java | 105 // Creates a new buffer with the given mark, position, limit, capacity, 116 // Creates a new buffer with the given mark, position, limit, and capacity 127 * capacity, its mark will be undefined, and each of its elements will be 131 * @param capacity 132 * The new buffer's capacity, in shorts 137 * If the <tt>capacity</tt> is a negative integer 139 public static ShortBuffer allocate(int capacity) { argument 140 if (capacity < 0) 142 return new HeapShortBuffer(capacity, capacity); [all...] |
H A D | CharBuffer.java | 132 // Creates a new buffer with the given mark, position, limit, capacity, 143 // Creates a new buffer with the given mark, position, limit, and capacity 154 * capacity, its mark will be undefined, and each of its elements will be 158 * @param capacity 159 * The new buffer's capacity, in chars 164 * If the <tt>capacity</tt> is a negative integer 166 public static CharBuffer allocate(int capacity) { argument 167 if (capacity < 0) 169 return new HeapCharBuffer(capacity, capacity); [all...] |
H A D | ByteBuffer.java | 218 // Creates a new buffer with the given mark, position, limit, capacity, 229 // Creates a new buffer with the given mark, position, limit, and capacity 240 * capacity, its mark will be undefined, and each of its elements will be 244 * @param capacity 245 * The new buffer's capacity, in bytes 250 * If the <tt>capacity</tt> is a negative integer 252 public static ByteBuffer allocateDirect(int capacity) { argument 253 if (capacity < 0) { 254 throw new IllegalArgumentException("capacity < 0: " + capacity); 278 allocate(int capacity) argument [all...] |
H A D | DirectByteBuffer.java | 69 MemoryRef(int capacity) { argument 71 buffer = (byte[]) runtime.newNonMovableArray(byte.class, capacity + 7); 99 DirectByteBuffer(int capacity, MemoryRef memoryRef) { argument 100 super(-1, 0, capacity, capacity, memoryRef.buffer, memoryRef.offset); 180 this.capacity(), 194 this.capacity(), 312 limit(capacity());
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
H A D | CipherSpiTest.java | 420 public MockNonArrayBackedByteBuffer(int capacity, boolean isReadOnly) { argument 421 super(capacity, 0 /* addr */, null /* fd */, null /* unmapper */, isReadOnly);
|
/libcore/ojluni/src/main/java/java/util/stream/ |
H A D | SpinedBuffer.java | 49 * {@link ArrayList}, as when the capacity of the list needs to be increased 90 * Constructs an empty list with the specified initial capacity. 92 * @param initialCapacity the initial capacity of the list 93 * @throws IllegalArgumentException if the specified initial capacity 103 * Constructs an empty list with an initial capacity of sixteen. 112 * Returns the current capacity of the buffer 114 protected long capacity() { method in class:SpinedBuffer 130 * Ensure that the buffer has at least capacity to hold the target size 134 long capacity = capacity(); 485 protected long capacity() { method in class:SpinedBuffer.OfPrimitive [all...] |
/libcore/ojluni/src/main/java/java/util/concurrent/ |
H A D | LinkedBlockingQueue.java | 66 * <p>The optional capacity bound constructor argument serves as a 67 * way to prevent excessive queue expansion. The capacity, if unspecified, 70 * queue above capacity. 136 /** The capacity bound, or Integer.MAX_VALUE if none */ 137 private final int capacity; field in class:LinkedBlockingQueue 246 * Creates a {@code LinkedBlockingQueue} with a capacity of 254 * Creates a {@code LinkedBlockingQueue} with the given (fixed) capacity. 256 * @param capacity the capacity of this queue 257 * @throws IllegalArgumentException if {@code capacity} i 260 LinkedBlockingQueue(int capacity) argument [all...] |
H A D | ArrayBlockingQueue.java | 65 * extracted by consumers. Once created, the capacity cannot be 219 * capacity and default access policy. 221 * @param capacity the capacity of this queue 222 * @throws IllegalArgumentException if {@code capacity < 1} 224 public ArrayBlockingQueue(int capacity) { argument 225 this(capacity, false); 230 * capacity and the specified access policy. 232 * @param capacity the capacity o 238 ArrayBlockingQueue(int capacity, boolean fair) argument 263 ArrayBlockingQueue(int capacity, boolean fair, Collection<? extends E> c) argument [all...] |
H A D | LinkedBlockingDeque.java | 56 * <p>The optional capacity bound constructor argument serves as a 57 * way to prevent excessive expansion. The capacity, if unspecified, 60 * deque above capacity. 155 private final int capacity; field in class:LinkedBlockingDeque 167 * Creates a {@code LinkedBlockingDeque} with a capacity of 175 * Creates a {@code LinkedBlockingDeque} with the given (fixed) capacity. 177 * @param capacity the capacity of this deque 178 * @throws IllegalArgumentException if {@code capacity} is less than 1 180 public LinkedBlockingDeque(int capacity) { argument [all...] |
/libcore/ojluni/src/main/java/java/util/ |
H A D | IdentityHashMap.java | 143 * The initial capacity used by the no-args constructor. 151 * The minimum capacity, used if a lower value is implicitly specified 159 * The maximum capacity, used if a higher value is implicitly specified 226 init(capacity(expectedMaxSize)); 230 * Returns the appropriate capacity for the given expected maximum size. 236 private static int capacity(int expectedMaxSize) { method in class:IdentityHashMap 246 * capacity, which is assumed to be a power of two between 439 // Next capacity is len, 2 * current capacity. 452 * Resizes the table if necessary to hold given capacity [all...] |
H A D | Vector.java | 40 * {@code capacity} and a {@code capacityIncrement}. The 41 * {@code capacity} is always at least as large as the vector 45 * capacity of a vector before inserting a large number of 89 * stored. The capacity of the vector is the length of this array buffer, 108 * The amount by which the capacity of the vector is automatically 109 * incremented when its size becomes greater than its capacity. If 110 * the capacity increment is less than or equal to zero, the capacity 121 * Constructs an empty vector with the specified initial capacity and 122 * capacity incremen 305 public synchronized int capacity() { method in class:Vector [all...] |
H A D | HashMap.java | 50 * collection views requires time proportional to the "capacity" of the 53 * capacity too high (or the load factor too low) if iteration performance is 57 * performance: <i>initial capacity</i> and <i>load factor</i>. The 58 * <i>capacity</i> is the number of buckets in the hash table, and the initial 59 * capacity is simply the capacity at the time the hash table is created. The 61 * get before its capacity is automatically increased. When the number of 63 * current capacity, the hash table is <i>rehashed</i> (that is, internal data 73 * setting its initial capacity, so as to minimize the number of 74 * rehash operations. If the initial capacity i 1342 final int capacity() { method in class:HashMap [all...] |
/libcore/luni/src/main/native/ |
H A D | org_apache_harmony_xml_ExpatParser.cpp | 66 StringStack() : array(new jstring[DEFAULT_CAPACITY]), capacity(DEFAULT_CAPACITY), size(0) { 74 if (size == capacity) { 75 int newCapacity = capacity * 2; 81 memcpy(newArray, array, capacity * sizeof(jstring)); 85 capacity = newCapacity; 99 int capacity; member in class:StringStack
|