/libcore/luni/src/main/java/java/nio/channels/ |
D | FileLock.java | 80 private final long size; field in FileLock 99 protected FileLock(FileChannel channel, long position, long size, boolean shared) { in FileLock() argument 100 if (position < 0 || size < 0 || position + size < 0) { in FileLock() 101 throw new IllegalArgumentException("position=" + position + " size=" + size); in FileLock() 105 this.size = size; in FileLock() 130 public final long size() { in size() method in FileLock 131 return size; in size() 156 final long end = position + size - 1; in overlaps() 199 return "FileLock[position=" + position + ", size=" + size + ", shared=" + shared + "]"; in toString()
|
/libcore/luni/src/main/java/libcore/io/ |
D | MemoryMappedFile.java | 37 private final long size; field in MemoryMappedFile 42 public MemoryMappedFile(long address, long size) { in MemoryMappedFile() argument 44 this.size = size; in MemoryMappedFile() 52 long size = Libcore.os.fstat(fd).st_size; in mmapRO() local 53 long address = Libcore.os.mmap(0L, size, PROT_READ, MAP_SHARED, fd, 0); in mmapRO() 55 return new MemoryMappedFile(address, size); in mmapRO() 68 Libcore.os.munmap(address, size); in close() 77 …return new NioBufferIterator(address, (int) size, ByteOrder.nativeOrder() != ByteOrder.BIG_ENDIAN); in bigEndianIterator() 84 …return new NioBufferIterator(address, (int) size, ByteOrder.nativeOrder() != ByteOrder.LITTLE_ENDI… in littleEndianIterator() 90 public long size() { in size() method in MemoryMappedFile [all …]
|
/libcore/luni/src/main/java/java/util/ |
D | ArrayList.java | 57 int size; field in ArrayList 104 size = a.length; in ArrayList() 116 int s = size; in add() 125 size = s + 1; in add() 145 int s = size; in add() 160 size = s + 1; in add() 194 int s = size; in addAll() 203 size = newSize; in addAll() 224 int s = size; in addAll() 245 size = newSize; in addAll() [all …]
|
D | PriorityQueue.java | 45 private int size; field in PriorityQueue 162 public int size() { in size() method in PriorityQueue 163 return size; in size() 172 size = 0; in clear() 191 growToSize(size + 1); in offer() 192 elements[size] = o; in offer() 193 siftUp(size++); in offer() 247 for (int targetIndex = 0; targetIndex < size; targetIndex++) { in remove() 280 return currentIndex < size - 1; in hasNext() 306 for (int i = 0; i < size; i++) { in readObject() [all …]
|
D | UnsafeArrayList.java | 29 private int size; field in UnsafeArrayList 37 if (size == array.length) { in add() 38 T[] newArray = (T[]) Array.newInstance(elementType, size * 2); in add() 39 System.arraycopy(array, 0, newArray, 0, size); in add() 42 array[size++] = element; in add() 55 public int size() { in size() method in UnsafeArrayList 56 return size; in size()
|
D | AbstractList.java | 49 return pos + 1 < size(); in hasNext() 90 if (start >= 0 && start <= size()) { in FullListIterator() 165 private int size; field in AbstractList.SubAbstractList 240 size = end - start; in SubAbstractList() 246 if (location >= 0 && location <= size) { in add() 248 size++; in add() 261 if (location >= 0 && location <= size) { in addAll() 265 size += collection.size(); in addAll() 278 boolean result = fullList.addAll(offset + size, collection); in addAll() 280 size += collection.size(); in addAll() [all …]
|
D | LinkedList.java | 44 transient int size = 0; field in LinkedList 70 if (location >= 0 && location <= list.size) { in LinkIterator() 75 if (location < list.size / 2) { in LinkIterator() 80 for (pos = list.size; pos >= location; pos--) { in LinkIterator() 99 list.size++; in add() 161 list.size--; in remove() 229 list.size--; in remove() 279 if (location >= 0 && location <= size) { in add() 281 if (location < (size / 2)) { in add() 286 for (int i = size; i > location; i--) { in add() [all …]
|
D | MiniEnumSet.java | 27 private int size; field in MiniEnumSet 97 public int size() { in size() method in MiniEnumSet 98 return size; in size() 104 size = 0; in clear() 114 size++; in add() 133 size = Long.bitCount(newBits); in addAll() 180 size = Long.bitCount(newBits); in removeAll() 193 if (size > 0) { in retainAll() 206 size = Long.bitCount(newBits); in retainAll() 227 size--; in remove() [all …]
|
D | HugeEnumSet.java | 32 private int size; field in HugeEnumSet 130 size++; in add() 153 size += Long.bitCount(newBits) - Long.bitCount(oldBits); in addAll() 163 public int size() { in size() method in HugeEnumSet 164 return size; in size() 170 size = 0; in clear() 175 size = 0; in complement() 184 size += Long.bitCount(b); in complement() 259 size--; in remove() 284 size += Long.bitCount(newBits) - Long.bitCount(oldBits); in removeAll() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | HashSetTest.java | 45 assertEquals("Created incorrect HashSet", 0, hs2.size()); in test_Constructor() 54 assertEquals("Created incorrect HashSet", 0, hs2.size()); in test_ConstructorI() 70 assertEquals("Created incorrect HashSet", 0, hs2.size()); in test_ConstructorIF() 90 hs2.size() == objArray.length); in test_ConstructorLjava_util_Collection() 105 int size = hs.size(); in test_addLjava_lang_Object() local 107 assertTrue("Added element already contained by set", hs.size() == size); in test_addLjava_lang_Object() 110 hs.size() == size + 1); in test_addLjava_lang_Object() 122 assertEquals("Returned non-zero size after clear", 0, hs.size()); in test_clear() 172 assertTrue("Returned iteration of incorrect size", hs.size() == x); in test_iterator() 184 int size = hs.size(); in test_removeLjava_lang_Object() local [all …]
|
D | ArrayDequeTest.java | 61 assertEquals(0, new ArrayDeque<Object>().size()); in test_Constructor() 68 assertEquals(0, new ArrayDeque<Object>(new ArrayList<Object>()).size()); in test_Constructor_LCollection() 81 assertEquals(0, new ArrayDeque<Object>(8).size()); in test_Constructor_Int() 83 assertEquals(0, zeroCapQue.size()); in test_Constructor_Int() 85 assertEquals(1, zeroCapQue.size()); in test_Constructor_Int() 86 assertEquals(0, new ArrayDeque<Object>(0).size()); in test_Constructor_Int() 88 assertEquals(0, negCapQue.size()); in test_Constructor_Int() 90 assertEquals(1, negCapQue.size()); in test_Constructor_Int() 92 assertEquals(0, oneCapQue.size()); in test_Constructor_Int() 94 assertEquals(1, oneCapQue.size()); in test_Constructor_Int() [all …]
|
D | ArrayListTest.java | 56 assertEquals("Incorrect arrayList created", 0, al.size()); in test_ConstructorI() 59 assertEquals("Incorrect arrayList created", 0, al.size()); in test_ConstructorI() 75 .size() == objArray.length); in test_ConstructorLjava_util_Collection() 140 alist.add(alist.size() + 1, new Object()); in test_addILjava_lang_Object() 148 alist.add(alist.size() + 1, null); in test_addILjava_lang_Object() 161 int size = alist.size(); in test_addILjava_lang_Object_2() local 162 alist.add(size, o); in test_addILjava_lang_Object_2() 163 assertEquals("Failed to add Object", alist.get(size), o); in test_addILjava_lang_Object_2() 164 assertEquals(alist.get(size - 2), objArray[size - 2]); in test_addILjava_lang_Object_2() 165 assertEquals(alist.get(size - 1), objArray[size - 1]); in test_addILjava_lang_Object_2() [all …]
|
D | TreeMapTest.java | 126 assertTrue("Map is incorrect size", myTreeMap.size() == objArray.length); in test_ConstructorLjava_util_Map() 158 assertEquals("Cleared map returned non-zero size", 0, tm.size()); in test_clear() 245 anEntrySet.size() == objArray.length); in test_entrySet() 279 assertEquals(2, tm.values().size()); in test_getLjava_lang_Object() 280 assertEquals(2, tm.keySet().size()); in test_getLjava_lang_Object() 293 assertEquals("Returned map of incorrect size", 3, head.size()); in test_headMapLjava_lang_Object() 308 assertEquals(0, smap.size()); in test_headMapLjava_lang_Object() 311 assertEquals(0, keySet.size()); in test_headMapLjava_lang_Object() 314 assertEquals(0, entrySet.size()); in test_headMapLjava_lang_Object() 317 assertEquals(0, valueCollection.size()); in test_headMapLjava_lang_Object() [all …]
|
D | LinkedHashSetTest.java | 42 assertEquals("Created incorrect LinkedHashSet", 0, hs2.size()); in test_Constructor() 51 assertEquals("Created incorrect LinkedHashSet", 0, hs2.size()); in test_ConstructorI() 66 assertEquals("Created incorrect LinkedHashSet", 0, hs2.size()); in test_ConstructorIF() 100 .size() == objArray.length); in test_ConstructorLjava_util_Collection() 115 int size = hs.size(); in test_addLjava_lang_Object() local 117 assertTrue("Added element already contained by set", hs.size() == size); in test_addLjava_lang_Object() 120 hs.size() == size + 1); in test_addLjava_lang_Object() 132 assertEquals("Returned non-zero size after clear", 0, hs.size()); in test_clear() 190 assertTrue("Returned iteration of incorrect size", hs.size() == x); in test_iterator() 203 int size = hs.size(); in test_removeLjava_lang_Object() local [all …]
|
D | VectorTest.java | 55 assertEquals("Vector creation failed", 0, v.size()); in test_Constructor() 66 assertEquals("Vector creation failed", 0, v.size()); in test_ConstructorI() 96 assertEquals("Wrong size", 4, grow.size()); in test_ConstructorII() 101 assertEquals("Wrong size", 1, emptyVector.size()); in test_ConstructorII() 104 assertEquals("Wrong size", 3, emptyVector.size()); in test_ConstructorII() 124 myVector.size() == objArray.length); in test_ConstructorLjava_util_Collection() 147 assertEquals("Wrong size after add", 101, tVector.size()); in test_addILjava_lang_Object() 154 assertEquals("Wrong size after add", 102, tVector.size()); in test_addILjava_lang_Object() 164 tVector.add(tVector.size() + 1, null); in test_addILjava_lang_Object() 179 assertEquals("Wrong size after add", 101, tVector.size()); in test_addLjava_lang_Object() [all …]
|
D | LinkedListTest.java | 112 ll.add(ll.size() + 1, "Test"); in test_addILjava_lang_Object() 119 ll.add(ll.size() + 1, null); in test_addILjava_lang_Object() 135 assertNull("Did not add null correctly", ll.get(ll.size() - 1)); in test_addLjava_lang_Object() 146 .size()); in test_addAllILjava_util_Collection() 178 ll.addAll(ll.size() + 1, (Collection) null); in test_addAllILjava_util_Collection() 213 for (int i = 0; i < ll.size(); i++) in test_addAllLjava_util_Collection() 218 .size()); in test_addAllLjava_util_Collection() 251 assertEquals(1, linkedList.size()); in test_addAll_Self_Ljava_util_Collection() 253 assertEquals(2, linkedList.size()); in test_addAll_Self_Ljava_util_Collection() 259 assertEquals(1, linkedList.size()); in test_addAll_Self_ILjava_util_Collection() [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | BitSetBenchmark.java | 25 private int size; field in BitSetBenchmark 30 bs = new BitSet(size); in setUp() 40 bs.set(bs.size() - 1); in timeIsEmptyFalse() 48 bs.get(i % size); in timeGet() 54 bs.clear(i % size); in timeClear() 60 bs.set(i % size); in timeSet() 66 bs.set(i % size, true); in timeSetOn() 72 bs.set(i % size, false); in timeSetOff()
|
/libcore/luni/src/main/java/java/util/logging/ |
D | MemoryHandler.java | 64 private int size = DEFAULT_SIZE; field in MemoryHandler 104 size = Integer.parseInt(sizeString); in MemoryHandler() 105 if (size <= 0) { in MemoryHandler() 106 size = DEFAULT_SIZE; in MemoryHandler() 123 buffer = new LogRecord[size]; in MemoryHandler() 144 public MemoryHandler(Handler target, int size, Level pushLevel) { in MemoryHandler() argument 145 if (size <= 0) { in MemoryHandler() 151 this.size = size; in MemoryHandler() 154 buffer = new LogRecord[size]; in MemoryHandler() 190 if (cursor >= size) { in publish() [all …]
|
/libcore/luni/src/main/java/java/nio/ |
D | FileChannelImpl.java | 94 …private FileLock basicLock(long position, long size, boolean shared, boolean wait) throws IOExcept… in basicLock() argument 106 if (position < 0 || size < 0) { in basicLock() 107 throw new IllegalArgumentException("position=" + position + " size=" + size); in basicLock() 110 FileLock pendingLock = new FileLockImpl(this, position, size, shared); in basicLock() 117 flock.l_len = translateLockLength(size); in basicLock() 140 public FileLockImpl(FileChannel channel, long position, long size, boolean shared) { in FileLockImpl() argument 141 super(channel, position, size, shared); in FileLockImpl() 159 public final FileLock lock(long position, long size, boolean shared) throws IOException { in lock() argument 166 resultLock = basicLock(position, size, shared, true); in lock() 179 public final FileLock tryLock(long position, long size, boolean shared) throws IOException { in tryLock() argument [all …]
|
/libcore/dom/src/test/java/org/w3c/domts/ |
D | JUnitTestCaseAdapter.java | 235 assertEquals(assertID, expectedSize, collection.size()); in assertSize() 245 int size = expected.size(); in assertEqualsIgnoreCase() local 248 assertEquals(assertID,size, actual.size()); in assertEqualsIgnoreCase() 249 boolean equals = (expected != null && actual != null && size == actual.size()); in assertEqualsIgnoreCase() 273 int size = expected.size(); in assertEqualsIgnoreCase() local 276 assertEquals(assertID,size, actual.size()); in assertEqualsIgnoreCase() 277 boolean equals = (expected != null && actual != null && size == actual.size()); in assertEqualsIgnoreCase() 281 for(int i = 0; i < size; i++) { in assertEqualsIgnoreCase() 309 int size = expected.size(); in assertEquals() local 312 assertEquals(assertID,size, actual.size()); in assertEquals() [all …]
|
/libcore/dex/src/main/java/com/android/dex/ |
D | TableOfContents.java | 99 stringIds.size = headerIn.readInt(); in readHeader() 101 typeIds.size = headerIn.readInt(); in readHeader() 103 protoIds.size = headerIn.readInt(); in readHeader() 105 fieldIds.size = headerIn.readInt(); in readHeader() 107 methodIds.size = headerIn.readInt(); in readHeader() 109 classDefs.size = headerIn.readInt(); in readHeader() 122 int size = in.readInt(); in readMap() local 125 if ((section.size != 0 && section.size != size) in readMap() 130 section.size = size; in readMap() 176 out.writeInt(stringIds.size); in writeHeader() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | CookieStoreTest.java | 63 assertEquals(1, list.size()); in test_add_LURI_LHttpCookie() 69 assertEquals(1, list.size()); in test_add_LURI_LHttpCookie() 79 assertEquals(2, list.size()); in test_add_LURI_LHttpCookie() 88 assertEquals(1, list.size()); in test_add_LURI_LHttpCookie() 91 assertEquals(3, list.size()); in test_add_LURI_LHttpCookie() 99 assertEquals(3, list.size()); in test_add_LURI_LHttpCookie() 107 assertEquals(2, list.size()); in test_add_LURI_LHttpCookie() 111 assertEquals(3, list.size()); in test_add_LURI_LHttpCookie() 113 assertEquals(2, list.size()); in test_add_LURI_LHttpCookie() 115 assertEquals(4, list.size()); in test_add_LURI_LHttpCookie() [all …]
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | AbstractExecutorService.java | 115 int ntasks = tasks.size(); in doInvokeAny() 176 for (int i = 0, size = futures.size(); i < size; i++) in doInvokeAny() 201 ArrayList<Future<T>> futures = new ArrayList<Future<T>>(tasks.size()); in invokeAll() 209 for (int i = 0, size = futures.size(); i < size; i++) { in invokeAll() 223 for (int i = 0, size = futures.size(); i < size; i++) in invokeAll() 234 ArrayList<Future<T>> futures = new ArrayList<Future<T>>(tasks.size()); in invokeAll() 241 final int size = futures.size(); in invokeAll() local 245 for (int i = 0; i < size; i++) { in invokeAll() 252 for (int i = 0; i < size; i++) { in invokeAll() 271 for (int i = 0, size = futures.size(); i < size; i++) in invokeAll()
|
/libcore/luni/src/main/native/ |
D | canonicalize_path.cpp | 78 if (resolved.size() > 1) { in canonicalize_path() 85 if (resolved[resolved.size() - 1] != '/') { in canonicalize_path() 105 } else if (resolved.size() > 1) { in canonicalize_path() 112 const char* maybeSlash = (symlink[symlink.size() - 1] != '/') ? "/" : ""; in canonicalize_path() 121 if (resolved.size() > 1 && resolved[resolved.size() - 1] == '/') { in canonicalize_path() 122 resolved.erase(resolved.size() - 1, 1); in canonicalize_path()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/support/ |
D | MethodLogger.java | 52 public int size() { in size() method in MethodLogger 53 return methods.size(); in size() 68 return (size() == 0 ? null : getMethod(size() - 1)); in getMethod() 84 return (size() == 0 ? null : getArgs(size() - 1)); in getArgs()
|