Searched refs:capacity (Results 1 - 23 of 23) sorted by relevance

/frameworks/base/core/java/com/google/android/collect/
H A DLists.java59 int capacity = (elements.length * 110) / 100 + 5;
60 ArrayList<E> list = new ArrayList<E>(capacity);
H A DSets.java65 int capacity = elements.length * 4 / 3 + 1;
66 HashSet<E> set = new HashSet<E>(capacity);
/frameworks/base/tests/CoreTests/android/core/
H A DVectorTest.java353 int capacity;
356 capacity = vector.capacity();
357 capacity = vector.capacity();
358 capacity = vector.capacity();
359 capacity = vector.capacity();
360 capacity
[all...]
H A DNIOTest.java39 assertTrue(b.limit() <= b.capacity());
120 for (int i = 0; i < b.capacity(); i++) {
199 assertEquals(4, bb.capacity());
214 b.limit(b.capacity());
335 assertEquals(4, bb.capacity());
342 assertEquals(2, sb.capacity());
350 assertEquals(2, sb.capacity());
358 assertEquals(1, ib.capacity());
365 assertEquals(1, ib.capacity());
372 assertEquals(1, fb.capacity());
[all...]
/frameworks/base/core/java/android/content/
H A DContentQueryMap.java140 int capacity = mValues != null ? mValues.size() : 0;
141 mValues = new HashMap<String, ContentValues>(capacity);
/frameworks/base/media/libdrm/mobile2/src/util/ustl-1.0/
H A Duvector.h57 inline size_type capacity (void) const { return (m_Data.capacity() / sizeof(T)); } function in class:ustl::vector
113 const size_type oldCapacity = capacity();
115 if (capacity() > oldCapacity)
116 construct (begin() + oldCapacity, begin() + capacity());
123 if (m_Data.capacity() < n * sizeof(T))
133 destroy (begin(), begin() + capacity());
H A Dsostream.h66 inline size_type capacity (void) const { return (m_Buffer.capacity()); } function in class:ustl::ostringstream
H A Dmemblock.h51 inline size_type capacity (void) const { return (m_Capacity); } function in class:ustl::memblock
H A Dustring.cpp214 assert ((first < begin() || first >= end() || size() + abs_distance(first,last) < capacity()) && "Insertion of self with autoresize is not supported");
255 assert ((i1 < begin() || i1 >= end() || abs_distance(i1,i2) * n + size() < capacity()) && "Replacement by self can not autoresize");
361 rv = vsnprintf (data(), memblock::capacity(), fmt, args2);
362 rv = min (rv, memblock::capacity());
363 } while (rv > capacity());
364 resize (min (rv, capacity()));
H A Dofstream.cpp81 if (eof() || (n > remaining() && n < capacity() - pos()))
H A Dubitset.h61 inline size_type capacity (void) const { return (s_nBits); }
H A Dustring.h69 inline size_type capacity (void) const { size_type c (memblock::capacity()); return (c - !!c); } function in class:ustl::string
H A Duspecial.h166 return (v.capacity() / CHAR_BIT);
/frameworks/base/libs/utils/
H A DVectorImpl.cpp90 sb = SharedBuffer::alloc(capacity() * mItemSize);
101 size_t VectorImpl::capacity() const function in class:android::VectorImpl
282 LOG_ASSERT(index<capacity(),
283 "[%p] itemLocation: index=%d, capacity=%d, count=%d",
284 this, (int)index, (int)capacity(), (int)mCount);
294 LOG_ASSERT(index<capacity(),
295 "[%p] editItemLocation: index=%d, capacity=%d, count=%d",
296 this, (int)index, (int)capacity(), (int)mCount);
306 size_t current_capacity = capacity();
309 // we can't reduce the capacity
[all...]
/frameworks/base/opengl/java/android/opengl/
H A DGroup.java110 numTriangles += indexBuffer.capacity()/3;
144 indexBuffer.capacity(),
/frameworks/base/awt/org/apache/harmony/awt/gl/
H A DMultiRectAreaOp.java28 * Rectangle buffer capacity
40 public static int[] createBuf(int capacity) { argument
41 if (capacity == 0) {
42 capacity = RECT_CAPACITY;
44 int[] buf = new int[capacity];
52 public static int[] checkBufSize(int[] buf, int capacity) { argument
53 if (buf[0] + capacity >= buf.length) {
54 int length = buf[0] + (capacity > RECT_CAPACITY ? capacity : RECT_CAPACITY);
59 buf[0] += capacity;
[all...]
/frameworks/base/core/jni/
H A Dandroid_media_AudioRecord.cpp359 long capacity = env->GetDirectBufferCapacity(jBuffer); local
360 if(capacity == -1) {
365 //LOGV("capacity = %ld", capacity);
374 capacity < sizeInBytes ? capacity : sizeInBytes);
/frameworks/base/include/utils/
H A DKeyedVector.h56 inline size_t capacity() const { return mVector.capacity(); } function in class:android::KeyedVector
57 //! setst the capacity. capacity can never be reduced less than size()
H A DVectorImpl.h65 size_t capacity() const;
H A DSortedVector.h65 inline size_t capacity() const { return VectorImpl::capacity(); } function in class:android::SortedVector
66 //! setst the capacity. capacity can never be reduced less than size()
H A DVector.h71 inline size_t capacity() const { return VectorImpl::capacity(); } function in class:android::Vector
72 //! setst the capacity. capacity can never be reduced less than size()
/frameworks/base/media/java/android/media/
H A DMediaPlayer.java1017 int capacity = request.dataSize() + 4 * (1 + allow.size() + 1 + block.size());
1019 if (request.dataCapacity() < capacity) {
1020 request.setDataCapacity(capacity);
/frameworks/base/core/java/android/os/
H A DBundle.java101 * @param capacity the initial capacity of the Bundle
103 public Bundle(int capacity) { argument
104 mMap = new HashMap<String, Object>(capacity);

Completed in 332 milliseconds