Home
last modified time | relevance | path

Searched refs:val (Results 1 – 25 of 186) sorted by relevance

12345678

/libcore/ojluni/src/main/java/java/io/
DBits.java84 static void putBoolean(byte[] b, int off, boolean val) { in putBoolean() argument
85 b[off] = (byte) (val ? 1 : 0); in putBoolean()
88 static void putChar(byte[] b, int off, char val) { in putChar() argument
89 b[off + 1] = (byte) (val ); in putChar()
90 b[off ] = (byte) (val >>> 8); in putChar()
93 static void putShort(byte[] b, int off, short val) { in putShort() argument
94 b[off + 1] = (byte) (val ); in putShort()
95 b[off ] = (byte) (val >>> 8); in putShort()
98 static void putInt(byte[] b, int off, int val) { in putInt() argument
99 b[off + 3] = (byte) (val ); in putInt()
[all …]
DExpiringCache.java46 private String val; field in ExpiringCache.Entry
48 Entry(long timestamp, String val) { in Entry() argument
50 this.val = val; in Entry()
56 String val() { return val; } in val() method in ExpiringCache.Entry
57 void setVal(String val) { this.val = val; } in setVal() argument
85 return entry.val(); in get()
90 synchronized void put(String key, String val) { in put() argument
97 entry.setVal(val); in put()
99 map.put(key, new Entry(System.currentTimeMillis(), val)); in put()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDateFormatSymbolsTest.java120 String[] val = { "AM", "PM" }; in test_getAmPmStrings() local
121 if (retVal.length != val.length) in test_getAmPmStrings()
123 for (int i = 0; i < val.length; i++) in test_getAmPmStrings()
124 assertTrue("Array values do not match", retVal[i].equals(val[i])); in test_getAmPmStrings()
134 String[] val = { "BC", "AD" }; in test_getEras() local
135 if (retVal.length != val.length) in test_getEras()
137 for (int i = 0; i < val.length; i++) in test_getEras()
138 assertTrue("Array values do not match", retVal[i].equals(val[i])); in test_getEras()
148 String[] val = { "January", "February", "March", "April", "May", in test_getMonths() local
151 assertEquals("Returned wrong array: ", val.length, retVal.length); in test_getMonths()
[all …]
/libcore/luni/src/main/java/java/math/
DBitLevel.java41 static int bitLength(BigInteger val) { in bitLength() argument
42 val.prepareJavaRepresentation(); in bitLength()
43 if (val.sign == 0) { in bitLength()
46 int bLength = (val.numberLength << 5); in bitLength()
47 int highDigit = val.digits[val.numberLength - 1]; in bitLength()
49 if (val.sign < 0) { in bitLength()
50 int i = val.getFirstNonzeroDigit(); in bitLength()
52 if (i == val.numberLength - 1) { in bitLength()
62 static int bitCount(BigInteger val) { in bitCount() argument
63 val.prepareJavaRepresentation(); in bitCount()
[all …]
DLogical.java39 static BigInteger not(BigInteger val) { in not() argument
40 if (val.sign == 0) { in not()
43 if (val.equals(BigInteger.MINUS_ONE)) { in not()
46 int[] resDigits = new int[val.numberLength + 1]; in not()
49 if (val.sign > 0) { in not()
51 if (val.digits[val.numberLength - 1] != -1) { in not()
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()
61 return new BigInteger(-val.sign, i + 1, resDigits); in not()
[all …]
DConversion.java53 static String bigInteger2String(BigInteger val, int radix) { in bigInteger2String() argument
54 val.prepareJavaRepresentation(); in bigInteger2String()
55 int sign = val.sign; in bigInteger2String()
56 int numberLength = val.numberLength; in bigInteger2String()
57 int[] digits = val.digits; in bigInteger2String()
72 return val.toString(); in bigInteger2String()
76 int resLengthInChars = (int) (val.abs().bitLength() / bitsForRadixDigit + ((sign < 0) ? 1 in bigInteger2String()
137 static String toDecimalScaledString(BigInteger val, int scale) { in toDecimalScaledString() argument
138 val.prepareJavaRepresentation(); in toDecimalScaledString()
139 int sign = val.sign; in toDecimalScaledString()
[all …]
DMultiplication.java91 static BigInteger multiplyByPositiveInt(BigInteger val, int factor) { in multiplyByPositiveInt() argument
92 BigInt bi = val.getBigInt().copy(); in multiplyByPositiveInt()
104 static BigInteger multiplyByTenPow(BigInteger val, long exp) { in multiplyByTenPow() argument
107 ? multiplyByPositiveInt(val, tenPows[(int)exp]) in multiplyByTenPow()
108 : val.multiply(powerOf10(exp))); in multiplyByTenPow()
177 static BigInteger multiplyByFivePow(BigInteger val, int exp) { in multiplyByFivePow() argument
180 return multiplyByPositiveInt(val, fivePows[exp]); in multiplyByFivePow()
182 return val.multiply(bigFivePows[exp]); in multiplyByFivePow()
184 return val.multiply(bigFivePows[1].pow(exp)); in multiplyByFivePow()
/libcore/luni/src/test/java/libcore/java/util/
DOldAndroidTreeMapTest.java49 int val = mRandom.nextInt(1000); in doTest() local
50 if (SPEW) System.out.println("Adding val = " + val); in doTest()
51 if (val < minVal) { in doTest()
52 minVal = val; in doTest()
54 if (val > maxVal) { in doTest()
55 maxVal = val; in doTest()
57 tm.put(new Integer(val), "V:" + val); in doTest()
58 hm.put(new Integer(val), "V:" + val); in doTest()
75 for (int val = 0; val < 1000; val++) { in doTest()
76 Integer vv = new Integer(val); in doTest()
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DIntegerTest.java199 for(int val : vals) {
201 assertEquals(val, Integer.parseUnsignedInt(Integer.toBinaryString(val), 2));
202 assertEquals(val, Integer.parseUnsignedInt(Integer.toOctalString(val), 8));
203 assertEquals(val, Integer.parseUnsignedInt(Integer.toUnsignedString(val)));
204 assertEquals(val, Integer.parseUnsignedInt(Integer.toHexString(val), 16));
207 assertEquals(val,
208 Integer.parseUnsignedInt(Integer.toUnsignedString(val, radix), radix));
237 for(int val : vals) {
238 long ul = Integer.toUnsignedLong(val);
240 assertEquals(val, (int) ul);
[all …]
DLongTest.java215 for(long val : vals) {
217 assertEquals(val, Long.parseUnsignedLong(Long.toBinaryString(val), 2));
218 assertEquals(val, Long.parseUnsignedLong(Long.toOctalString(val), 8));
219 assertEquals(val, Long.parseUnsignedLong(Long.toUnsignedString(val)));
220 assertEquals(val, Long.parseUnsignedLong(Long.toHexString(val), 16));
223 assertEquals(val,
224 Long.parseUnsignedLong(Long.toUnsignedString(val, radix), radix));
254 for(long val : vals) {
256 assertTrue(Long.toUnsignedString(val, 2).equals(Long.toBinaryString(val)));
257 assertTrue(Long.toUnsignedString(val, 8).equals(Long.toOctalString(val)));
[all …]
/libcore/ojluni/src/main/java/sun/security/x509/
DX509CertInfo.java364 public void set(String name, Object val) in set() argument
380 setVersion(val); in set()
382 version.set(suffix, val); in set()
388 setSerialNumber(val); in set()
390 serialNum.set(suffix, val); in set()
396 setAlgorithmId(val); in set()
398 algId.set(suffix, val); in set()
403 setIssuer(val); in set()
408 setValidity(val); in set()
410 interval.set(suffix, val); in set()
[all …]
DKeyUsageExtension.java93 private void set(int position, boolean val) { in set() argument
100 bitString[position] = val; in set()
172 DerValue val = new DerValue(this.extensionValue); in KeyUsageExtension() local
173 this.bitString = val.getUnalignedBitString().toBooleanArray(); in KeyUsageExtension()
192 boolean val = ((Boolean)obj).booleanValue(); in set()
194 set(0,val); in set()
196 set(1,val); in set()
198 set(2,val); in set()
200 set(3,val); in set()
202 set(4,val); in set()
[all …]
DExtension.java83 DerValue val = in.getDerValue(); in Extension() local
84 if (val.tag == DerValue.tag_Boolean) { in Extension()
85 critical = val.getBoolean(); in Extension()
88 val = in.getDerValue(); in Extension()
89 extensionValue = val.getOctetString(); in Extension()
92 extensionValue = val.getOctetString(); in Extension()
242 byte[] val = extensionValue; in hashCode()
243 int len = val.length; in hashCode()
245 h += len * val[--len]; in hashCode()
DNetscapeCertTypeExtension.java146 private void set(int position, boolean val) { in set() argument
153 bitString[position] = val; in set()
196 DerValue val = new DerValue(this.extensionValue); in NetscapeCertTypeExtension() local
197 this.bitString = val.getUnalignedBitString().toBooleanArray(); in NetscapeCertTypeExtension()
216 boolean val = ((Boolean)obj).booleanValue(); in set()
217 set(getPosition(name), val); in set() local
311 Boolean val = Boolean.TRUE; in getKeyUsageMappedBits() local
317 keyUsage.set(KeyUsageExtension.DIGITAL_SIGNATURE, val); in getKeyUsageMappedBits()
320 keyUsage.set(KeyUsageExtension.KEY_ENCIPHERMENT, val); in getKeyUsageMappedBits()
325 keyUsage.set(KeyUsageExtension.KEY_CERTSIGN, val); in getKeyUsageMappedBits()
/libcore/luni/src/test/java/libcore/android/system/
DStructTimespecTest.java28 StructTimespec val = new StructTimespec(Long.MIN_VALUE, 0); in testConstructor() local
29 assertEquals(Long.MIN_VALUE, val.tv_sec); in testConstructor()
30 assertEquals(0, val.tv_nsec); in testConstructor()
32 val = new StructTimespec(-23, 23); in testConstructor()
33 assertEquals(-23, val.tv_sec); in testConstructor()
34 assertEquals(23, val.tv_nsec); in testConstructor()
36 val = new StructTimespec(0, 42); in testConstructor()
37 assertEquals(0, val.tv_sec); in testConstructor()
38 assertEquals(42, val.tv_nsec); in testConstructor()
40 val = new StructTimespec(23, 91); in testConstructor()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/
DTCKWeekFieldsSerialization.java111 byte[] val = Arrays.copyOf(template, template.length); in test_invalid_serialform()
112 System.arraycopy(good1, 0, val, 105, good1.length); in test_invalid_serialform()
113 try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(val))) { in test_invalid_serialform()
122 val = Arrays.copyOf(template, template.length); in test_invalid_serialform()
123 System.arraycopy(bad1, 0, val, 105, bad1.length); in test_invalid_serialform()
124 try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(val))) { in test_invalid_serialform()
133 val = Arrays.copyOf(template, template.length); in test_invalid_serialform()
134 System.arraycopy(bad2, 0, val, 105, bad2.length); in test_invalid_serialform()
135 try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(val))) { in test_invalid_serialform()
144 val = Arrays.copyOf(template, 110); in test_invalid_serialform()
[all …]
DTCKValueRangeSerialization.java146 byte[] val = Arrays.copyOf(template, template.length); in test_invalid_serialform()
147 System.arraycopy(bad1, 0, val, 114, bad1.length); in test_invalid_serialform()
148 try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(val))) { in test_invalid_serialform()
157 val = Arrays.copyOf(template, template.length); in test_invalid_serialform()
158 System.arraycopy(bad1, 0, val, 114, bad2.length); in test_invalid_serialform()
159 try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(val))) { in test_invalid_serialform()
168 val = Arrays.copyOf(template, template.length); in test_invalid_serialform()
169 System.arraycopy(bad1, 0, val, 114, bad3.length); in test_invalid_serialform()
170 try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(val))) { in test_invalid_serialform()
/libcore/ojluni/src/main/java/sun/net/
DNetProperties.java112 String val = null; in getInteger() local
115 val = System.getProperty(key, props.getProperty(key)); in getInteger()
120 if (val != null) { in getInteger()
122 return Integer.decode(val); in getInteger()
141 String val = null; in getBoolean() local
144 val = System.getProperty(key, props.getProperty(key)); in getBoolean()
149 if (val != null) { in getBoolean()
151 return Boolean.valueOf(val); in getBoolean()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DFieldTest.java188 Double val = (Double) f.get(x); in test_getLjava_lang_Object() local
191 val.doubleValue() == Double.MAX_VALUE); in test_getLjava_lang_Object()
195 val = (Double) f.get(x); in test_getLjava_lang_Object()
196 assertEquals("Returned incorrect double field value", 1.0, val.doubleValue()); in test_getLjava_lang_Object()
560 boolean val = false; in test_getBooleanLjava_lang_Object()
563 val = f.getBoolean(x); in test_getBooleanLjava_lang_Object()
567 assertTrue("Returned incorrect boolean field value", val); in test_getBooleanLjava_lang_Object()
614 byte val = 0; in test_getByteLjava_lang_Object()
617 val = f.getByte(x); in test_getByteLjava_lang_Object()
621 assertTrue("Returned incorrect byte field value", val == Byte.MAX_VALUE); in test_getByteLjava_lang_Object()
[all …]
/libcore/ojluni/src/main/java/sun/security/util/
DPropertyExpander.java108 String val = System.getProperty(prop); in expand() local
109 if (val != null) { in expand()
115 !(new URI(val)).isAbsolute()) { in expand()
116 val = sun.net.www.ParseUtil.encodePath(val); in expand()
119 val = sun.net.www.ParseUtil.encodePath(val); in expand()
122 sb.append(val); in expand()
/libcore/ojluni/src/main/java/sun/net/util/
DIPAddressUtil.java141 int val; in textToNumericFormatV6() local
163 val = 0; in textToNumericFormatV6()
168 val <<= 4; in textToNumericFormatV6()
169 val |= chval; in textToNumericFormatV6()
170 if (val > 0xffff) in textToNumericFormatV6()
187 dst[j++] = (byte) ((val >> 8) & 0xff); in textToNumericFormatV6()
188 dst[j++] = (byte) (val & 0xff); in textToNumericFormatV6()
190 val = 0; in textToNumericFormatV6()
219 dst[j++] = (byte) ((val >> 8) & 0xff); in textToNumericFormatV6()
220 dst[j++] = (byte) (val & 0xff); in textToNumericFormatV6()
/libcore/luni/src/main/java/javax/xml/datatype/
DDatatypeFactory.java403 long val = _durationInMilliseconds; in newDurationDayTime() local
404 int milliseconds = (int) (val % 60000L); // 60000 milliseconds per minute in newDurationDayTime()
410 val = val / 60000L; in newDurationDayTime()
411 int minutes = (int) (val % 60L); // 60 minutes per hour in newDurationDayTime()
412 val = val / 60L; in newDurationDayTime()
413 int hours = (int) (val % 24L); // 24 hours per day in newDurationDayTime()
414 long days = val / 24L; in newDurationDayTime()
427 val = val / 60000L; in newDurationDayTime()
428 BigInteger minutes = BigInteger.valueOf(val % 60L); // 60 minutes per hour in newDurationDayTime()
429 val = val / 60L; in newDurationDayTime()
[all …]
/libcore/ojluni/src/main/native/
DProcessEnvironment_md.c71 jbyteArray var, val; in ProcessEnvironment_environ() local
77 val = (*env)->NewByteArray(env, valLength); in ProcessEnvironment_environ()
78 if (val == NULL) return NULL; in ProcessEnvironment_environ()
81 (*env)->SetByteArrayRegion(env, val, 0, valLength, in ProcessEnvironment_environ()
84 (*env)->SetObjectArrayElement(env, result, 2*j+1, val); in ProcessEnvironment_environ()
86 (*env)->DeleteLocalRef(env, val); in ProcessEnvironment_environ()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DChannelsTest.java93 for (int val = 0; val < this.writebufSize / 2; val++) { in writeFileSame()
94 writebuf = writebuf + ((char) (val + 64)); in writeFileSame()
186 for (int val = 0; val < this.writebufSize / 2; val++) { in testNewChannelOutputStream_inputNull()
187 writebuf.putChar((char) (val + 64)); in testNewChannelOutputStream_inputNull()
228 for (int val = 0; val < this.writebufSize / 2; val++) { in testNewChannelOutputStream()
229 writebuf.putChar((char) (val + 64)); in testNewChannelOutputStream()
504 for (int val = 0; val < this.writebufSize / 2; val++) { in testNewWriterWritableByteChannelString_internalBufZero()
505 writebuf = writebuf + ((char) (val + 64)); in testNewWriterWritableByteChannelString_internalBufZero()
535 for (int val = 0; val < this.writebufSize / 2; val++) { in testNewWriterWritableByteChannelString_InputNull()
536 writebuf = writebuf + ((char) (val + 64)); in testNewWriterWritableByteChannelString_InputNull()
[all …]
/libcore/ojluni/annotations/hiddenapi/java/io/
DObjectOutputStream.java99 public void write(int val) throws java.io.IOException { in write() argument
123 public void writeBoolean(boolean val) throws java.io.IOException { in writeBoolean() argument
127 public void writeByte(int val) throws java.io.IOException { in writeByte() argument
131 public void writeShort(int val) throws java.io.IOException { in writeShort() argument
135 public void writeChar(int val) throws java.io.IOException { in writeChar() argument
139 public void writeInt(int val) throws java.io.IOException { in writeInt() argument
143 public void writeLong(long val) throws java.io.IOException { in writeLong() argument
147 public void writeFloat(float val) throws java.io.IOException { in writeFloat() argument
151 public void writeDouble(double val) throws java.io.IOException { in writeDouble() argument
614 public abstract void put(java.lang.String name, boolean val); in put() argument
[all …]

12345678