/libcore/luni/src/main/java/java/math/ |
D | Logical.java | 47 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 …]
|
D | BitLevel.java | 50 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 …]
|
D | Primality.java | 72 for (int i = 0; i < primes.length; i++) { 73 BIprimes[i] = BigInteger.valueOf(primes[i]); 87 int i, j; in nextProbablePrime() local 97 for (i = 0; l >= primes[i]; i++) {} in nextProbablePrime() 98 return BIprimes[i]; in nextProbablePrime() 115 for (i = 0; i < primes.length; i++) { in nextProbablePrime() 116 modules[i] = BigInt.remainderByPositiveInt(startPoint, primes[i]) - gapSize; in nextProbablePrime() 123 for (i = 0; i < primes.length; i++) { in nextProbablePrime() 124 modules[i] = (modules[i] + gapSize) % primes[i]; in nextProbablePrime() 125 j = (modules[i] == 0) ? 0 : (primes[i] - modules[i]); in nextProbablePrime() [all …]
|
/libcore/luni/src/test/java/tests/api/org/xml/sax/ |
D | InputSourceTest.java | 31 InputSource i = new InputSource(); in testInputSource() local 33 assertNull(i.getByteStream()); in testInputSource() 34 assertNull(i.getCharacterStream()); in testInputSource() 35 assertNull(i.getEncoding()); in testInputSource() 36 assertNull(i.getPublicId()); in testInputSource() 37 assertNull(i.getSystemId()); in testInputSource() 41 InputSource i = new InputSource("Foo"); in testInputSourceString() local 43 assertNull(i.getByteStream()); in testInputSourceString() 44 assertNull(i.getCharacterStream()); in testInputSourceString() 45 assertNull(i.getEncoding()); in testInputSourceString() [all …]
|
/libcore/luni/src/main/java/java/lang/ |
D | Integer.java | 155 int length = string.length(), i = 0; in decode() local 159 char firstDigit = string.charAt(i); in decode() 165 firstDigit = string.charAt(++i); in decode() 170 if (++i == length) { in decode() 173 if ((firstDigit = string.charAt(i)) == 'x' || firstDigit == 'X') { in decode() 174 if (++i == length) { in decode() 182 if (++i == length) { in decode() 188 int result = parse(string, i, base, negative); in decode() 357 int length = string.length(), i = 0; in parseInt() local 361 boolean negative = string.charAt(i) == '-'; in parseInt() [all …]
|
D | IntegralToString.java | 124 public static String intToString(int i, int radix) { in intToString() argument 129 return intToString(i); in intToString() 139 if (i < 0) { in intToString() 142 i = -i; in intToString() 150 int q = i / radix; in intToString() 151 buf[--cursor] = DIGITS[radix * q - i]; in intToString() 152 i = q; in intToString() 153 } while (i != 0); in intToString() 165 public static String intToString(int i) { 166 return convertInt(null, i); [all …]
|
/libcore/luni/src/test/java/tests/api/java/util/ |
D | WeakHashMapTest.java | 55 for (int i = 0; i < 100; i++) in test_Constructor() 56 whm.put(keyArray[i], valueArray[i]); in test_Constructor() 57 for (int i = 0; i < 100; i++) in test_Constructor() 59 whm.get(keyArray[i]) == valueArray[i]); in test_Constructor() 69 for (int i = 0; i < 100; i++) in test_ConstructorI() 70 whm.put(keyArray[i], valueArray[i]); in test_ConstructorI() 71 for (int i = 0; i < 100; i++) in test_ConstructorI() 73 whm.get(keyArray[i]) == valueArray[i]); in test_ConstructorI() 94 for (int i = 0; i < 100; i++) in test_ConstructorIF() 95 whm.put(keyArray[i], valueArray[i]); in test_ConstructorIF() [all …]
|
D | BitSetTest.java | 87 for (int i = 0; i < 8; i++) { in test_clear() 88 assertTrue("Clear didn't clear bit " + i, !eightbs.get(i)); in test_clear() 106 for (int i = 0; i < 7; i++) in test_clearI() 107 assertTrue("Clear cleared incorrect bits", eightbs.get(i)); in test_clearI() 150 for (int i = 0; i < 20; i++) { in test_clearII() 151 bitset.set(i); in test_clearII() 166 for (int i = initialSize; i < bs.size(); i++) { in test_clearII() 167 assertFalse("Shouldn't have flipped bit " + i, bs.get(i)); in test_clearII() 176 for (int i = 0; i < 7; i++) { in test_clearII() 177 assertTrue("Shouldn't have cleared bit " + i, bs.get(i)); in test_clearII() [all …]
|
/libcore/luni/src/main/java/java/util/concurrent/atomic/ |
D | AtomicLongArray.java | 33 private long checkedByteOffset(int i) { in checkedByteOffset() argument 34 if (i < 0 || i >= array.length) in checkedByteOffset() 35 throw new IndexOutOfBoundsException("index " + i); in checkedByteOffset() 37 return byteOffset(i); in checkedByteOffset() 40 private static long byteOffset(int i) { in byteOffset() argument 41 return ((long) i << shift) + base; in byteOffset() 81 public final long get(int i) { in get() argument 82 return getRaw(checkedByteOffset(i)); in get() 95 public final void set(int i, long newValue) { in set() argument 96 unsafe.putLongVolatile(array, checkedByteOffset(i), newValue); in set() [all …]
|
D | AtomicIntegerArray.java | 34 private long checkedByteOffset(int i) { in checkedByteOffset() argument 35 if (i < 0 || i >= array.length) in checkedByteOffset() 36 throw new IndexOutOfBoundsException("index " + i); in checkedByteOffset() 38 return byteOffset(i); in checkedByteOffset() 41 private static long byteOffset(int i) { in byteOffset() argument 42 return ((long) i << shift) + base; in byteOffset() 82 public final int get(int i) { in get() argument 83 return getRaw(checkedByteOffset(i)); in get() 96 public final void set(int i, int newValue) { in set() argument 97 unsafe.putIntVolatile(array, checkedByteOffset(i), newValue); in set() [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
D | MacTest.java | 77 for (int i = 0; i < validAlgorithmsMac.length; i++) { 78 defaultProvider = SpiEngUtils.isSupport(validAlgorithmsMac[i], 82 defaultAlgorithm = validAlgorithmsMac[i]; 121 for (int i = 0; i < invalidValues.length; i++) { in testMac01() 123 Mac.getInstance(invalidValues[i]); in testMac01() 125 .concat(invalidValues[i])); in testMac01() 141 for (int i = 0; i < validValues.length; i++) { in testMac02() 142 mac = Mac.getInstance(validValues[i]); in testMac02() 143 assertEquals("Incorrect algorithm", mac.getAlgorithm(), validValues[i]); in testMac02() 158 for (int i = 0; i < validValues.length; i++) { in testMac03() [all …]
|
D | KeyAgreementTest.java | 126 for (int i = 0; i < invalidValues.length; i++) { in testGetInstanceString01() 128 KeyAgreement.getInstance(invalidValues[i]); in testGetInstanceString01() 145 for (int i = 0; i < validValues.length; i++) { in testGetInstanceString02() 146 keyA = KeyAgreement.getInstance(validValues[i]); in testGetInstanceString02() 148 validValues[i]); in testGetInstanceString02() 170 for (int i = 0; i < invalidValues.length; i++) { in testGetInstanceStringString01() 172 KeyAgreement.getInstance(invalidValues[i], defaultProviderName); in testGetInstanceStringString01() 193 for (int i = 0; i < validValues.length; i++) { in testGetInstanceStringString02() 195 KeyAgreement.getInstance(validValues[i], provider); in testGetInstanceStringString02() 200 KeyAgreement.getInstance(validValues[i], ""); in testGetInstanceStringString02() [all …]
|
D | KeyGeneratorTest.java | 78 for (int i = 0; i < validAlgorithmsKeyGenerator.length; i++) { 79 defaultProvider = SpiEngUtils.isSupport(validAlgorithmsKeyGenerator[i], 83 defaultAlgorithm = validAlgorithmsKeyGenerator[i]; 84 defaultKeySize = validKeySizes[i]; 164 for (int i = 0; i < invalidValues.length; i++) { in testGetInstanceString01() 166 KeyGenerator.getInstance(invalidValues[i]); in testGetInstanceString01() 183 for (int i = 0; i < validValues.length; i++) { in testGetInstanceString02() 184 keyG = KeyGenerator.getInstance(validValues[i]); in testGetInstanceString02() 185 assertEquals("Incorrect algorithm", keyG.getAlgorithm(), validValues[i]); in testGetInstanceString02() 208 for (int i = 0; i < invalidValues.length; i++) { in testGetInstanceStringString01() [all …]
|
/libcore/luni/src/test/java/tests/security/cert/ |
D | CertPathBuilder2Test.java | 85 for (int i = 0; i <invalidValues.length; i++) { in checkResult() 86 Security.setProperty(propName, invalidValues[i]); in checkResult() 88 if (!dtN.equals(invalidValues[i]) && !dtN.equals(dt)) { in checkResult() 120 for (int i = 0; i < invalidValues.length; i++) { in testGetInstance01() 122 CertPathBuilder.getInstance(invalidValues[i]); in testGetInstance01() 124 invalidValues[i]).concat(")")); in testGetInstance01() 129 for (int i = 0; i < validValues.length; i++) { in testGetInstance01() 130 cerPB = CertPathBuilder.getInstance(validValues[i]); in testGetInstance01() 131 assertEquals("Incorrect type", cerPB.getAlgorithm(), validValues[i]); in testGetInstance01() 155 for (int i = 0; i < invalidValues.length; i++) { in testGetInstance02() [all …]
|
/libcore/luni/src/main/java/libcore/net/url/ |
D | UrlUtils.java | 41 for (int i = 0; i <= path.length(); ) { in canonicalizePath() 43 if (i == path.length()) { in canonicalizePath() 44 nextSegmentStart = i; in canonicalizePath() 45 } else if (path.charAt(i) == '/') { in canonicalizePath() 46 nextSegmentStart = i + 1; in canonicalizePath() 48 i++; in canonicalizePath() 57 if (i == segmentStart + 1 && path.regionMatches(segmentStart, ".", 0, 1)) { in canonicalizePath() 60 i = segmentStart; in canonicalizePath() 61 } else if (i == segmentStart + 2 && path.regionMatches(segmentStart, "..", 0, 2)) { in canonicalizePath() 67 i = segmentStart = prevSegmentStart; in canonicalizePath() [all …]
|
/libcore/xml/src/main/java/org/kxml2/kdom/ |
D | Element.java | 102 for (int i = 0; i < getAttributeCount (); i++) { in getAttributeValue() 103 if (name.equals (getAttributeName (i)) in getAttributeValue() 104 && (namespace == null || namespace.equals (getAttributeNamespace(i)))) { in getAttributeValue() 105 return getAttributeValue (i); in getAttributeValue() 147 for (int i = 0; i < cnt; i++) { in getNamespaceUri() 148 if (prefix == getNamespacePrefix (i) || in getNamespaceUri() 149 (prefix != null && prefix.equals (getNamespacePrefix (i)))) in getNamespaceUri() 150 return getNamespaceUri (i); in getNamespaceUri() 165 public String getNamespacePrefix (int i) { in getNamespacePrefix() argument 166 return ((String []) prefixes.elementAt (i)) [0]; in getNamespacePrefix() [all …]
|
/libcore/luni/src/main/java/java/util/ |
D | BitSet.java | 66 int i = longCount - 1; in shrinkSize() local 67 while (i >= 0 && bits[i] == 0) { in shrinkSize() 68 --i; in shrinkSize() 70 this.longCount = i + 1; in shrinkSize() 126 for (int i = 0; i < longCount; ++i) { in equals() 127 if (bits[i] != lhs.bits[i]) { in equals() 152 for (int i = 0; i < longCount; ++i) { in hashCode() 153 x ^= bits[i] * (i + 1); in hashCode() 278 for (int i = 1; i < lastArrayIndex - firstArrayIndex; i++) { in get() 279 newBits[i] = bits[firstArrayIndex + i]; in get() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | OldAndroidInstanceofTest.java | 45 for (int i = 0; i < 100000; i++) { in testNoInterface() 52 for (int i = 0; i < 100000; i++) { in testDerivedOne() 59 for (int i = 0; i < 100000; i++) { in testDerivedTwo() 66 for (int i = 0; i < 100000; i++) { in testDerivedThree() 73 for (int i = 0; i < 100000; i++) { in testDerivedFour() 80 for (int i = 0; i < 100000; i++) { in testSuccessClass() 87 for (int i = 0; i < 100000; i++) { in testSuccessInterface() 94 for (int i = 0; i < 100000; i++) { in testFailInterface()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | OldListIteratorTest.java | 32 for (int i = 0; i < objArray.length; i++) 33 objArray[i] = new Integer(i); 37 for (int i = 0; i < objArray.length; i++) { in testHasNext() 45 for (int i = 0; i < objArray.length; i++) { in testNext() 46 assertTrue(objArray[i].equals(l.next())); in testNext() 106 for (int i = 0; i < objArray.length; i++) { in testRemove() 130 for (int i = 0; i < objArray.length; i++) { in testHasPrevious() 147 for (int i = objArray.length - 1; i > -1 ; i--) { in testPrevious() 148 assertTrue(objArray[i].equals(l.previous())); in testPrevious() 160 for (int i = 0; i < objArray.length; i++) { in testNextIndex() [all …]
|
/libcore/luni/src/main/java/libcore/net/ |
D | UriCodec.java | 44 for (int i = start; i < end; ) { in validate() 45 char ch = uri.charAt(i); in validate() 50 i++; in validate() 52 if (i + 2 >= end) { in validate() 53 throw new URISyntaxException(uri, "Incomplete % sequence in " + name, i); in validate() 55 int d1 = hexToInt(uri.charAt(i + 1)); in validate() 56 int d2 = hexToInt(uri.charAt(i + 2)); in validate() 59 + uri.substring(i, i + 3) + " in " + name, i); in validate() 61 i += 3; in validate() 63 throw new URISyntaxException(uri, "Illegal character in " + name, i); in validate() [all …]
|
/libcore/luni/src/main/java/org/xml/sax/helpers/ |
D | AttributeListImpl.java | 120 for (int i = 0; i < count; i++) { in setAttributeList() 121 addAttribute(atts.getName(i), atts.getType(i), atts.getValue(i)); in setAttributeList() 161 int i = names.indexOf(name); in removeAttribute() local 162 if (i != -1) { in removeAttribute() 163 names.remove(i); in removeAttribute() 164 types.remove(i); in removeAttribute() 165 values.remove(i); in removeAttribute() 212 public String getName(int i) { in getName() argument 213 if (i < 0 || i >= names.size()) { in getName() 216 return names.get(i); in getName() [all …]
|
D | AttributesImpl.java | 202 for (int i = 0; i < max; i += 5) { in getIndex() 203 if (data[i].equals(uri) && data[i+1].equals(localName)) { in getIndex() 204 return i / 5; in getIndex() 221 for (int i = 0; i < max; i += 5) { in getIndex() 222 if (data[i+2].equals(qName)) { in getIndex() 223 return i / 5; in getIndex() 243 for (int i = 0; i < max; i += 5) { in getType() 244 if (data[i].equals(uri) && data[i+1].equals(localName)) { in getType() 245 return data[i+3]; in getType() 263 for (int i = 0; i < max; i += 5) { in getType() [all …]
|
/libcore/luni/src/test/java/tests/api/javax/net/ssl/ |
D | KeyManagerFactory2Test.java | 134 for (int i = 0; i < invalidValues.length; i++) { in test_getInstanceLjava_lang_String() 136 KeyManagerFactory.getInstance(invalidValues[i]); in test_getInstanceLjava_lang_String() 138 .concat(invalidValues[i]).concat(")")); in test_getInstanceLjava_lang_String() 143 for (int i = 0; i < validValues.length; i++) { in test_getInstanceLjava_lang_String() 144 keyMF = KeyManagerFactory.getInstance(validValues[i]); in test_getInstanceLjava_lang_String() 146 validValues[i]); in test_getInstanceLjava_lang_String() 171 for (int i = 0; i < invalidValues.length; i++) { in test_getInstanceLjava_lang_StringLjava_lang_String() 174 .getInstance(invalidValues[i], mProv.getName()); in test_getInstanceLjava_lang_StringLjava_lang_String() 176 .concat(invalidValues[i]).concat(")")); in test_getInstanceLjava_lang_StringLjava_lang_String() 181 for (int i = 0; i < validValues.length; i++) { in test_getInstanceLjava_lang_StringLjava_lang_String() [all …]
|
D | TrustManagerFactory2Test.java | 124 for (int i = 0; i < invalidValues.length; i++) { in test_getInstanceLjava_lang_String() 126 TrustManagerFactory.getInstance(invalidValues[i]); in test_getInstanceLjava_lang_String() 128 .concat(invalidValues[i]).concat(")")); in test_getInstanceLjava_lang_String() 133 for (int i = 0; i < validValues.length; i++) { in test_getInstanceLjava_lang_String() 134 tmf = TrustManagerFactory.getInstance(validValues[i]); in test_getInstanceLjava_lang_String() 138 validValues[i]); in test_getInstanceLjava_lang_String() 161 for (int i = 0; i < invalidValues.length; i++) { in test_getInstanceLjava_lang_StringLjava_lang_String() 163 TrustManagerFactory.getInstance(invalidValues[i], mProv in test_getInstanceLjava_lang_StringLjava_lang_String() 166 .concat(invalidValues[i]).concat(")")); in test_getInstanceLjava_lang_StringLjava_lang_String() 171 for (int i = 0; i < validValues.length; i++) { in test_getInstanceLjava_lang_StringLjava_lang_String() [all …]
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | OldHttpRetryExceptionTest.java | 28 for(int i = 0; i < message.length; i++) { in test_ConstructorLStringI() 29 HttpRetryException hre = new HttpRetryException(message[i], in test_ConstructorLStringI() 30 codes[i]); in test_ConstructorLStringI() 31 assertEquals(message[i], hre.getReason()); in test_ConstructorLStringI() 33 hre.responseCode() == codes[i]); in test_ConstructorLStringI() 43 for(int i = 0; i < message.length; i++) { in test_ConstructorLStringILString() 44 HttpRetryException hre = new HttpRetryException(message[i], in test_ConstructorLStringILString() 45 codes[i], locations[i]); in test_ConstructorLStringILString() 46 assertEquals(message[i], hre.getReason()); in test_ConstructorLStringILString() 48 hre.responseCode() == codes[i]); in test_ConstructorLStringILString() [all …]
|