Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 954) sorted by relevance

12345678910>>...39

/libcore/luni/src/main/java/java/math/
DLogical.java47 int i; in not() local
52 for (i = 0; val.digits[i] == -1; i++) { in not()
56 for (i = 0; (i < val.numberLength) && (val.digits[i] == -1); i++) { in not()
59 if (i == val.numberLength) { in not()
60 resDigits[i] = 1; in not()
61 return new BigInteger(-val.sign, i + 1, resDigits); in not()
67 for (i = 0; val.digits[i] == 0; i++) { in not()
68 resDigits[i] = -1; in not()
73 resDigits[i] = val.digits[i] + val.sign; in not()
75 for (i++; i < val.numberLength; i++) { in not()
[all …]
DBitLevel.java50 int i = val.getFirstNonzeroDigit(); in bitLength() local
52 if (i == val.numberLength - 1) { in bitLength()
70 int i = val.getFirstNonzeroDigit(); in bitCount() local
72 for ( ; i < val.numberLength; i++) { in bitCount()
73 bCount += Integer.bitCount(val.digits[i]); in bitCount()
77 bCount += Integer.bitCount(-val.digits[i]); in bitCount()
78 for (i++; i < val.numberLength; i++) { in bitCount()
79 bCount += Integer.bitCount(~val.digits[i]); in bitCount()
106 int i; in nonZeroDroppedBits() local
108 for (i = 0; (i < intCount) && (digits[i] == 0); i++) { in nonZeroDroppedBits()
[all …]
/libcore/luni/src/main/java/java/lang/
DInteger.java146 int length = string.length(), i = 0; in decode() local
152 char firstDigit = string.charAt(i); in decode()
160 firstDigit = string.charAt(++i); in decode()
165 if (++i == length) { in decode()
168 if ((firstDigit = string.charAt(i)) == 'x' || firstDigit == 'X') { in decode()
169 if (++i == length) { in decode()
179 if (++i == length) { in decode()
187 int result = parse(string, i, base, negative); in decode()
359 int length = string.length(), i = 0; in parseInt() local
365 boolean negative = string.charAt(i) == '-'; in parseInt()
[all …]
DThreadGroup.java148 for (int i = 0; i < numThreads; i++) { in activeCount()
149 if(childrenThreads[i].isAlive()) { in activeCount()
157 for (int i = 0; i < numGroups; i++) { in activeCount()
158 count += this.childrenGroups[i].activeCount(); in activeCount()
174 for (int i = 0; i < numGroups; i++) { in activeGroupCount()
176 count += 1 + this.childrenGroups[i].activeGroupCount(); in activeGroupCount()
292 for (int i = 0; i < toDestroy; i++) { in destroy()
421 for (int i = enumeratingThreads ? numThreads : numGroups; --i >= 0;) { in enumerateGeneric()
422 if (!enumeratingThreads || ((Thread) immediateCollection[i]).isAlive()) { in enumerateGeneric()
426 enumeration[enumerationIndex++] = immediateCollection[i]; in enumerateGeneric()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/sql/tests/java/sql/
DDataTruncationTest.java71 for (int i = 0; i < loopCount; i++) { in testDataTruncationintbooleanbooleanintint()
73 aDataTruncation = new DataTruncation(init1[i], init2[i], in testDataTruncationintbooleanbooleanintint()
74 init3[i], init4[i], init5[i]); in testDataTruncationintbooleanbooleanintint()
75 if (theExceptions[i] != null) { in testDataTruncationintbooleanbooleanintint()
78 assertEquals(i + " Final state mismatch", aDataTruncation in testDataTruncationintbooleanbooleanintint()
79 .getSQLState(), theFinalStates1[i]); in testDataTruncationintbooleanbooleanintint()
80 assertEquals(i + " Final state mismatch", aDataTruncation in testDataTruncationintbooleanbooleanintint()
81 .getMessage(), theFinalStates2[i]); in testDataTruncationintbooleanbooleanintint()
82 assertEquals(i + " Final state mismatch", aDataTruncation in testDataTruncationintbooleanbooleanintint()
83 .getErrorCode(), theFinalStates3[i]); in testDataTruncationintbooleanbooleanintint()
[all …]
DBatchUpdateExceptionTest.java57 for (int i = 0; i < loopCount; i++) { in testBatchUpdateException()
60 if (theExceptions[i] != null) { in testBatchUpdateException()
63 assertEquals(i + " Final state mismatch: ", in testBatchUpdateException()
65 theFinalStates1[i]); in testBatchUpdateException()
66 assertEquals(i + " Final state mismatch: ", in testBatchUpdateException()
68 theFinalStates2[i]); in testBatchUpdateException()
69 assertEquals(i + " Final state mismatch: ", in testBatchUpdateException()
70 aBatchUpdateException.getSQLState(), theFinalStates3[i]); in testBatchUpdateException()
71 assertEquals(i + " Final state mismatch: ", in testBatchUpdateException()
72 aBatchUpdateException.getMessage(), theFinalStates4[i]); in testBatchUpdateException()
[all …]
DSQLExceptionTest.java94 for (int i = 0; i < loopCount; i++) { in testSQLExceptionStringStringint()
96 aSQLException = new SQLException(init1[i], init2[i], init3[i]); in testSQLExceptionStringStringint()
97 if (theExceptions[i] != null) { in testSQLExceptionStringStringint()
100 assertEquals(i + " Final state mismatch", aSQLException in testSQLExceptionStringStringint()
101 .getMessage(), theFinalStates1[i]); in testSQLExceptionStringStringint()
102 assertEquals(i + " Final state mismatch", aSQLException in testSQLExceptionStringStringint()
103 .getSQLState(), theFinalStates2[i]); in testSQLExceptionStringStringint()
104 assertEquals(i + " Final state mismatch", aSQLException in testSQLExceptionStringStringint()
105 .getErrorCode(), theFinalStates3[i]); in testSQLExceptionStringStringint()
106 assertEquals(i + " Final state mismatch", aSQLException in testSQLExceptionStringStringint()
[all …]
DSQLWarningTest.java57 for (int i = 0; i < loopCount; i++) { in testSQLWarning()
60 if (theExceptions[i] != null) { in testSQLWarning()
63 assertEquals(i + " Final state mismatch", aSQLWarning in testSQLWarning()
64 .getMessage(), theFinalStates1[i]); in testSQLWarning()
65 assertEquals(i + " Final state mismatch", aSQLWarning in testSQLWarning()
66 .getSQLState(), theFinalStates2[i]); in testSQLWarning()
67 assertEquals(i + " Final state mismatch", aSQLWarning in testSQLWarning()
68 .getErrorCode(), theFinalStates3[i]); in testSQLWarning()
69 assertEquals(i + " Final state mismatch", aSQLWarning in testSQLWarning()
70 .getNextWarning(), theFinalStates4[i]); in testSQLWarning()
[all …]
/libcore/luni/src/test/java/tests/api/java/util/concurrent/
DAtomicLongArrayTest.java26 for (int i = 0; i < SIZE; ++i) in testConstructor()
27 assertEquals(0,ai.get(i)); in testConstructor()
48 for (int i = 0; i < a.length; ++i) in testConstructor2()
49 assertEquals(a[i], ai.get(i)); in testConstructor2()
84 for (int i = 0; i < SIZE; ++i) { in testGetSet()
85 ai.set(i, 1); in testGetSet()
86 assertEquals(1,ai.get(i)); in testGetSet()
87 ai.set(i, 2); in testGetSet()
88 assertEquals(2,ai.get(i)); in testGetSet()
89 ai.set(i, -3); in testGetSet()
[all …]
DAtomicIntegerArrayTest.java27 for (int i = 0; i < SIZE; ++i) in testConstructor()
28 assertEquals(0,ai.get(i)); in testConstructor()
49 for (int i = 0; i < a.length; ++i) in testConstructor2()
50 assertEquals(a[i], ai.get(i)); in testConstructor2()
85 for (int i = 0; i < SIZE; ++i) { in testGetSet()
86 ai.set(i, 1); in testGetSet()
87 assertEquals(1,ai.get(i)); in testGetSet()
88 ai.set(i, 2); in testGetSet()
89 assertEquals(2,ai.get(i)); in testGetSet()
90 ai.set(i, -3); in testGetSet()
[all …]
DPriorityQueueTest.java34 for (int i = n-1; i >= 0; i-=2) in populatedQueue()
35 assertTrue(q.offer(new Integer(i))); in populatedQueue()
36 for (int i = (n & 1); i < n; i+=2) in populatedQueue()
37 assertTrue(q.offer(new Integer(i))); in populatedQueue()
87 for (int i = 0; i < SIZE-1; ++i) in testConstructor5()
88 ints[i] = new Integer(i); in testConstructor5()
99 for (int i = 0; i < SIZE; ++i) in testConstructor6()
100 ints[i] = new Integer(i); in testConstructor6()
102 for (int i = 0; i < SIZE; ++i) in testConstructor6()
103 assertEquals(ints[i], q.poll()); in testConstructor6()
[all …]
DLinkedListTest.java27 for(int i = 0; i < n; ++i) in populatedQueue()
28 assertTrue(q.offer(new Integer(i))); in populatedQueue()
59 for (int i = 0; i < SIZE; ++i) in testConstructor6()
60 ints[i] = new Integer(i); in testConstructor6()
62 for (int i = 0; i < SIZE; ++i) in testConstructor6()
63 assertEquals(ints[i], q.poll()); in testConstructor6()
87 for (int i = 0; i < SIZE; ++i) { in testSize()
88 assertEquals(SIZE-i, q.size()); in testSize()
91 for (int i = 0; i < SIZE; ++i) { in testSize()
92 assertEquals(i, q.size()); in testSize()
[all …]
DAtomicReferenceArrayTest.java26 for (int i = 0; i < SIZE; ++i) { in testConstructor()
27 assertNull(ai.get(i)); in testConstructor()
49 for (int i = 0; i < a.length; ++i) in testConstructor2()
50 assertEquals(a[i], ai.get(i)); in testConstructor2()
86 for (int i = 0; i < SIZE; ++i) { in testGetSet()
87 ai.set(i, one); in testGetSet()
88 assertSame(one,ai.get(i)); in testGetSet()
89 ai.set(i, two); in testGetSet()
90 assertSame(two,ai.get(i)); in testGetSet()
91 ai.set(i, m3); in testGetSet()
[all …]
DArrayDequeTest.java25 for (int i = 0; i < n; ++i) in populatedDeque()
26 assertTrue(q.offerLast(new Integer(i))); in populatedDeque()
55 for (int i = 0; i < SIZE; ++i) in testConstructor6()
56 ints[i] = new Integer(i); in testConstructor6()
58 for (int i = 0; i < SIZE; ++i) in testConstructor6()
59 assertEquals(ints[i], q.pollFirst()); in testConstructor6()
81 for (int i = 0; i < SIZE; ++i) { in testSize()
82 assertEquals(SIZE-i, q.size()); in testSize()
85 for (int i = 0; i < SIZE; ++i) { in testSize()
86 assertEquals(i, q.size()); in testSize()
[all …]
DConcurrentLinkedQueueTest.java28 for (int i = 0; i < n; ++i) in populatedQueue()
29 assertTrue(q.offer(new Integer(i))); in populatedQueue()
69 for (int i = 0; i < SIZE-1; ++i) in testConstructor5()
70 ints[i] = new Integer(i); in testConstructor5()
81 for (int i = 0; i < SIZE; ++i) in testConstructor6()
82 ints[i] = new Integer(i); in testConstructor6()
84 for (int i = 0; i < SIZE; ++i) in testConstructor6()
85 assertEquals(ints[i], q.poll()); in testConstructor6()
107 for (int i = 0; i < SIZE; ++i) { in testSize()
108 assertEquals(SIZE-i, q.size()); in testSize()
[all …]
DDelayQueueTest.java30 PDelay(int i) { pseudodelay = Integer.MIN_VALUE + i; } in PDelay() argument
32 int i = pseudodelay; in compareTo() local
34 if (i < j) return -1; in compareTo()
35 if (i > j) return 1; in compareTo()
69 NanoDelay(long i) { in NanoDelay() argument
70 trigger = System.nanoTime() + i; in NanoDelay()
73 long i = trigger; in compareTo() local
75 if (i < j) return -1; in compareTo()
76 if (i > j) return 1; in compareTo()
113 for (int i = n-1; i >= 0; i-=2) in populatedQueue()
[all …]
/libcore/luni/src/test/java/tests/api/org/xml/sax/
DInputSourceTest.java42 InputSource i = new InputSource(); in testInputSource() local
44 assertNull(i.getByteStream()); in testInputSource()
45 assertNull(i.getCharacterStream()); in testInputSource()
46 assertNull(i.getEncoding()); in testInputSource()
47 assertNull(i.getPublicId()); in testInputSource()
48 assertNull(i.getSystemId()); in testInputSource()
57 InputSource i = new InputSource("Foo"); in testInputSourceString() local
59 assertNull(i.getByteStream()); in testInputSourceString()
60 assertNull(i.getCharacterStream()); in testInputSourceString()
61 assertNull(i.getEncoding()); in testInputSourceString()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/util/
DBitSetTest.java107 for (int i = 0; i < 8; i++) { in test_clear()
108 assertFalse("Clear didn't clear bit " + i, eightbs.get(i)); in test_clear()
132 for (int i = 0; i < 7; i++) in test_clearI()
133 assertTrue("Clear cleared incorrect bits", eightbs.get(i)); in test_clearI()
180 for (int i = 0; i < 20; i++) { in test_clearII()
181 bitset.set(i); in test_clearII()
193 for (int i = 0; i < 7; i++) { in test_clearII()
194 if (i == 5) in test_clearII()
195 assertFalse("Shouldn't have flipped bit " + i, bs.get(i)); in test_clearII()
197 assertTrue("Shouldn't have cleared bit " + i, bs.get(i)); in test_clearII()
[all …]
/libcore/luni/src/main/java/org/apache/xml/utils/
DXMLChar.java267 for (int i = 0; i < charRange.length; i += 2) {
268 for (int j = charRange[i]; j <= charRange[i + 1]; j++) {
274 for (int i = 0; i < specialChar.length; i++) {
275 CHARS[specialChar[i]] = (byte)(CHARS[specialChar[i]] & ~MASK_CONTENT);
279 for (int i = 0; i < spaceChar.length; i++) {
280 CHARS[spaceChar[i]] |= MASK_SPACE;
284 for (int i = 0; i < nameStartChar.length; i++) {
285 CHARS[nameStartChar[i]] |= MASK_NAME_START | MASK_NAME |
288 for (int i = 0; i < letterRange.length; i += 2) {
289 for (int j = letterRange[i]; j <= letterRange[i + 1]; j++) {
[all …]
DIntVector.java164 for (int i = 0; i < numberOfElements; i++) in addElements()
236 for (int i = 0; i < m_firstFree; i++) in removeAllElements()
238 m_map[i] = java.lang.Integer.MIN_VALUE; in removeAllElements()
258 for (int i = 0; i < m_firstFree; i++) in removeElement()
260 if (m_map[i] == s) in removeElement()
262 if ((i + 1) < m_firstFree) in removeElement()
263 System.arraycopy(m_map, i + 1, m_map, i - 1, m_firstFree - i); in removeElement()
265 m_map[i] = java.lang.Integer.MIN_VALUE; in removeElement()
284 public final void removeElementAt(int i) in removeElementAt() argument
287 if (i > m_firstFree) in removeElementAt()
[all …]
/libcore/luni/src/test/java/tests/api/java/util/
DBitSetTest.java162 for (int i = 0; i < 8; i++) in test_clear()
163 assertTrue("Clear didn't clear bit " + i, !eightbs.get(i)); in test_clear()
193 for (int i = 0; i < 7; i++) in test_clearI()
194 assertTrue("Clear cleared incorrect bits", eightbs.get(i)); in test_clearI()
230 for (int i = 0; i < 7; i++) { in test_clearII()
231 if (i == 5) in test_clearII()
232 assertTrue("Shouldn't have flipped bit " + i, !bs.get(i)); in test_clearII()
234 assertTrue("Shouldn't have cleared bit " + i, bs.get(i)); in test_clearII()
236 for (int i = 7; i < 11; i++) in test_clearII()
237 assertTrue("Failed to clear bit " + i, !bs.get(i)); in test_clearII()
[all …]
/libcore/luni/src/main/java/java/util/concurrent/atomic/
DAtomicLongArray.java26 private long checkedByteOffset(int i) { in checkedByteOffset() argument
27 if (i < 0 || i >= array.length) in checkedByteOffset()
28 throw new IndexOutOfBoundsException("index " + i); in checkedByteOffset()
30 return byteOffset(i); in checkedByteOffset()
33 private static long byteOffset(int i) { in byteOffset() argument
34 return base + (long) i * scale; in byteOffset()
74 public final long get(int i) { in get() argument
75 return getRaw(checkedByteOffset(i)); in get()
88 public final void set(int i, long newValue) { in set() argument
89 unsafe.putLongVolatile(array, checkedByteOffset(i), newValue); in set()
[all …]
DAtomicIntegerArray.java27 private long checkedByteOffset(int i) { in checkedByteOffset() argument
28 if (i < 0 || i >= array.length) in checkedByteOffset()
29 throw new IndexOutOfBoundsException("index " + i); in checkedByteOffset()
31 return byteOffset(i); in checkedByteOffset()
34 private static long byteOffset(int i) { in byteOffset() argument
35 return base + (long) i * scale; in byteOffset()
75 public final int get(int i) { in get() argument
76 return getRaw(checkedByteOffset(i)); in get()
89 public final void set(int i, int newValue) { in set() argument
90 unsafe.putIntVolatile(array, checkedByteOffset(i), newValue); in set()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/
DURITest.java130 for (int i = 0; i < constructorTests.length; i++) { in test_ConstructorLjava_lang_String()
132 new URI(constructorTests[i]); in test_ConstructorLjava_lang_String()
134 fail("Failed to construct URI for: " + constructorTests[i] in test_ConstructorLjava_lang_String()
170 for (int i = 0; i < constructorTestsInvalid.length; i++) { in test_ConstructorLjava_lang_String()
172 new URI(constructorTestsInvalid[i]); in test_ConstructorLjava_lang_String()
174 + constructorTestsInvalid[i]); in test_ConstructorLjava_lang_String()
177 + constructorTestsInvalid[i] + " expected: " in test_ConstructorLjava_lang_String()
178 + constructorTestsInvalidIndices[i] + ", received: " in test_ConstructorLjava_lang_String()
180 e.getIndex() == constructorTestsInvalidIndices[i]); in test_ConstructorLjava_lang_String()
212 for (int i = 0; i < invalid2.length; i++) { in test_ConstructorLjava_lang_String()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/
DCertificateRequest.java81 for (int i = 0; i < accepted.length; i++) { in CertificateRequest()
82 certificate_authorities[i] = accepted[i].getIssuerX500Principal(); in CertificateRequest()
83 encoded_principals[i] = certificate_authorities[i].getEncoded(); in CertificateRequest()
84 totalPrincipalsLength += encoded_principals[i].length + 2; in CertificateRequest()
113 for (int i = 0; i < certificate_authorities.length; i++) { in CertificateRequest()
114 certificate_authorities[i] = principals.elementAt(i); in CertificateRequest()
133 for (int i = 0; i < certificate_types.length; i++) { in send()
134 out.write(certificate_types[i]); in send()
137 for (int i = 0; i < certificate_authorities.length; i++) { in send()
138 authoritiesLength += encoded_principals[i].length +2; in send()
[all …]

12345678910>>...39