Home
last modified time | relevance | path

Searched refs:number (Results 1 – 25 of 63) sorted by relevance

123

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DNumberTest.java26 int number = 1231243; in test_byteValue() local
27 assertTrue("Incorrect byte returned for: " + number, in test_byteValue()
28 ((byte) Integer.valueOf(number).intValue()) == Integer.valueOf(number) in test_byteValue()
30 number = 0; in test_byteValue()
31 assertTrue("Incorrect byte returned for: " + number, in test_byteValue()
32 ((byte) Integer.valueOf(number).intValue()) == Integer.valueOf(number) in test_byteValue()
34 number = -1; in test_byteValue()
35 assertTrue("Incorrect byte returned for: " + number, in test_byteValue()
36 ((byte) Integer.valueOf(number).intValue()) == Integer.valueOf(number) in test_byteValue()
38 number = -84109328; in test_byteValue()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerOperateBitsTest.java130 int number = -7; in testClearBitException() local
133 aNumber.clearBit(number); in testClearBitException()
145 int number = 0; in testClearBitZero() local
148 BigInteger result = aNumber.clearBit(number); in testClearBitZero()
163 int number = 95; in testClearBitZeroOutside1() local
166 BigInteger result = aNumber.clearBit(number); in testClearBitZeroOutside1()
181 int number = 15; in testClearBitNegativeInside1() local
184 BigInteger result = aNumber.clearBit(number); in testClearBitNegativeInside1()
199 int number = 44; in testClearBitNegativeInside2() local
202 BigInteger result = aNumber.clearBit(number); in testClearBitNegativeInside2()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DSupport_DecimalFormat.java42 Number number = Double.valueOf(10000000.76); in t_format_with_FieldPosition() local
45 t_FormatWithField(0, format, number, text, NumberFormat.Field.CURRENCY, 0, 1); in t_format_with_FieldPosition()
46 t_FormatWithField(1, format, number, text, NumberFormat.Field.INTEGER, 1, 11); in t_format_with_FieldPosition()
47 t_FormatWithField(2, format, number, text, NumberFormat.Field.GROUPING_SEPARATOR, 3, 4); in t_format_with_FieldPosition()
48 t_FormatWithField(3, format, number, text, NumberFormat.Field.DECIMAL_SEPARATOR, 11, 12); in t_format_with_FieldPosition()
49 t_FormatWithField(4, format, number, text, NumberFormat.Field.FRACTION, 12, 14); in t_format_with_FieldPosition()
52 t_FormatWithField(5, format, number, text, NumberFormat.Field.SIGN, 0, 0); in t_format_with_FieldPosition()
53 t_FormatWithField(6, format, number, text, NumberFormat.Field.EXPONENT, 0, 0); in t_format_with_FieldPosition()
54 t_FormatWithField(7, format, number, text, NumberFormat.Field.EXPONENT_SIGN, 0, 0); in t_format_with_FieldPosition()
55 t_FormatWithField(8, format, number, text, NumberFormat.Field.EXPONENT_SYMBOL, 0, 0); in t_format_with_FieldPosition()
[all …]
DDecimalFormatTest.java97 Number number = form.parse("23.1", new ParsePosition(0)); in test_parse_returnType() local
98 assertTrue(number instanceof Double); in test_parse_returnType()
104 number = form.parse("23.1", new ParsePosition(0)); in test_parse_returnType()
105 assertTrue(number instanceof Double); in test_parse_returnType()
108 number = form.parse("23.1", new ParsePosition(0)); in test_parse_returnType()
110 assertTrue(number instanceof BigDecimal); in test_parse_returnType()
111 assertEquals(new BigDecimal("23.1"), number); in test_parse_returnType()
119 number = form.parse("23.1f", new ParsePosition(0)); in test_parse_returnType()
121 assertTrue(number instanceof Long); in test_parse_returnType()
123 number = form.parse("23.0", new ParsePosition(0)); in test_parse_returnType()
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_DecimalFormat.java44 Number number = Double.valueOf(10000000.76); in t_format_with_FieldPosition() local
47 t_FormatWithField(0, format, number, text, NumberFormat.Field.CURRENCY, in t_format_with_FieldPosition()
49 t_FormatWithField(1, format, number, text, NumberFormat.Field.INTEGER, in t_format_with_FieldPosition()
51 t_FormatWithField(2, format, number, text, in t_format_with_FieldPosition()
53 t_FormatWithField(3, format, number, text, in t_format_with_FieldPosition()
55 t_FormatWithField(4, format, number, text, NumberFormat.Field.FRACTION, in t_format_with_FieldPosition()
59 t_FormatWithField(5, format, number, text, NumberFormat.Field.SIGN, 0, in t_format_with_FieldPosition()
61 t_FormatWithField(6, format, number, text, NumberFormat.Field.EXPONENT, in t_format_with_FieldPosition()
63 t_FormatWithField(7, format, number, text, in t_format_with_FieldPosition()
65 t_FormatWithField(8, format, number, text, in t_format_with_FieldPosition()
[all …]
/libcore/ojluni/src/main/java/java/text/
DDecimalFormat.java635 public final StringBuffer format(Object number, in format() argument
638 if (number instanceof Long || number instanceof Integer || in format()
639 number instanceof Short || number instanceof Byte || in format()
640 number instanceof AtomicInteger || in format()
641 number instanceof AtomicLong || in format()
642 (number instanceof BigInteger && in format()
643 ((BigInteger)number).bitLength () < 64)) { in format()
644 return format(((Number)number).longValue(), toAppendTo, pos); in format()
645 } else if (number instanceof BigDecimal) { in format()
646 return format((BigDecimal)number, toAppendTo, pos); in format()
[all …]
DNumberFormat.java273 public StringBuffer format(Object number, in format() argument
276 if (number instanceof Long || number instanceof Integer || in format()
277 number instanceof Short || number instanceof Byte || in format()
278 number instanceof AtomicInteger || number instanceof AtomicLong || in format()
279 (number instanceof BigInteger && in format()
280 ((BigInteger)number).bitLength() < 64)) { in format()
281 return format(((Number)number).longValue(), toAppendTo, pos); in format()
282 } else if (number instanceof Number) { in format()
283 return format(((Number)number).doubleValue(), toAppendTo, pos); in format()
327 public final String format(double number) { in format() argument
[all …]
/libcore/ojluni/src/test/java/util/HashMap/
DNullKeyAtResize.java39 int number = 0; in main() local
40 while(number < 100000) { in main()
43 Integer adding = (number += 100); in main()
50 System.out.println("Encountered resize after " + (number / 100) + " iterations"); in main()
57 if(number == 100000) { in main()
/libcore/jsr166-tests/src/test/java/jsr166/
DForkJoinTaskTest.java339 int number;
341 this.number = n;
346 int n = f.number;
359 number = ((AsyncFib)x).number + ((AsyncFib)y).number;
364 int number;
366 this.number = n;
371 int n = f.number;
398 assertEquals(21, f.number);
414 assertEquals(21, f.number);
429 assertEquals(21, f.number);
[all …]
DCountedCompleterTest.java528 int number;
533 this.number = n;
538 int n = number;
555 int n = number + rnumber;
557 p.number = n;
559 number = n;
569 int n = number + rnumber;
573 number = n;
579 int number;
584 this.number = n;
[all …]
DForkJoinPool8Test.java188 final int number; field in ForkJoinPool8Test.FibAction
190 FibAction(int n) { number = n; } in FibAction()
192 int n = number; in realCompute()
206 final int number; field in ForkJoinPool8Test.FailingFibAction
208 FailingFibAction(int n) { number = n; } in FailingFibAction()
210 int n = number; in compute()
866 int number; field in ForkJoinPool8Test.CCF
871 this.number = n; in CCF()
877 int n = number; in compute()
882 f.number = n; in compute()
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DForkJoinTaskTest.java361 int number;
363 this.number = n;
368 int n = f.number;
381 number = ((AsyncFib)x).number + ((AsyncFib)y).number;
386 int number;
388 this.number = n;
393 int n = f.number;
420 assertEquals(21, f.number);
436 assertEquals(21, f.number);
451 assertEquals(21, f.number);
[all …]
DCountedCompleterTest.java553 int number;
558 this.number = n;
563 int n = number;
580 int n = number + rnumber;
582 p.number = n;
584 number = n;
594 int n = number + rnumber;
598 number = n;
604 int number;
609 this.number = n;
[all …]
DForkJoinPool8Test.java212 final int number; field in ForkJoinPool8Test.FibAction
214 FibAction(int n) { number = n; } in FibAction()
216 int n = number; in realCompute()
230 final int number; field in ForkJoinPool8Test.FailingFibAction
232 FailingFibAction(int n) { number = n; } in FailingFibAction()
234 int n = number; in compute()
884 int number; field in ForkJoinPool8Test.CCF
889 this.number = n; in CCF()
895 int n = number; in compute()
900 f.number = n; in compute()
[all …]
/libcore/json/src/main/java/org/json/
DJSONTokener.java309 String number = literal; in readLiteral() local
310 if (number.startsWith("0x") || number.startsWith("0X")) { in readLiteral()
311 number = number.substring(2); in readLiteral()
313 } else if (number.startsWith("0") && number.length() > 1) { in readLiteral()
314 number = number.substring(1); in readLiteral()
318 long longValue = Long.parseLong(number, base); in readLiteral()
/libcore/ojluni/src/test/java/util/stream/examples/
DJavadocExamples.java48 List<Integer> integers = numbers.<Integer>mapMulti((number, consumer) -> { in testNumberIntegerExample()
49 if (number instanceof Integer) { in testNumberIntegerExample()
50 consumer.accept((Integer)number); in testNumberIntegerExample()
/libcore/luni/src/test/java/libcore/java/text/
DDecimalFormatTest.java513 double number = 0.1; in testPerMill() local
521 assertEquals("100\u2030", df.format(number)); in testPerMill()
524 assertEquals("100\u2030", df.format(number)); in testPerMill()
530 assertEquals("100;", new DecimalFormat(pattern, dfs).format(number)); in testPerMill()
540 assertEquals("\u0661\u0660\u0660\u0609", df.format(number)); in testPerMill()
544 assertEquals("\u0661\u0660\u0660\u0609", df.format(number)); in testPerMill()
557 assertEquals("1000/00", df.format(number)); in testPerMill()
561 assertEquals("100\u2030", df.format(number)); in testPerMill()
570 double number = 0.1; in testPercent() local
578 assertEquals("10%", df.format(number)); in testPercent()
[all …]
/libcore/luni/src/test/resources/bundles/java/util/logging/
Dres.properties11 pattern=US_pattern {0, number}
12 pattern{0,number}=US
Dres_en_US.properties11 pattern=US_pattern {0, number}
12 pattern{0,number}=US
Dres3.properties11 pattern=pattern {0, number}3
12 pattern{0,number}=NOLOCALE3
Dres_zh_CN.properties11 pattern=ZH_CN_pattern {0, number}
12 pattern{0,number}=ZH_CN
Dres2.properties11 pattern=pattern {0, number}2
12 pattern{0,number}=NOLOCALE2
/libcore/ojluni/annotations/hiddenapi/java/text/
DNumberFormat.java52 java.lang.Object number, in format() argument
63 public final java.lang.String format(double number) { in format() argument
67 public final java.lang.String format(long number) { in format() argument
72 double number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos); in format() argument
75 long number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos); in format() argument
/libcore/ojluni/src/test/java/lang/ref/
DReferenceEnqueuePendingTest.java38 int number; field in ReferenceEnqueuePendingTest.NumberedWeakReference
42 number = i; in NumberedWeakReference()
139 a[length++] = weakRead.number; in checkResult()
/libcore/ojluni/annotations/sdk/nullability/java/text/
DNumberFormat.annotated.java54 …lic java.lang.StringBuffer format(@libcore.util.NonNull java.lang.Object number, @libcore.util.Non… in format() argument
58 @libcore.util.NonNull public final java.lang.String format(double number) { throw new RuntimeExcept… in format() argument
60 @libcore.util.NonNull public final java.lang.String format(long number) { throw new RuntimeExceptio… in format() argument
62 @libcore.util.NonNull public abstract java.lang.StringBuffer format(double number, @libcore.util.No… in format() argument
64 @libcore.util.NonNull public abstract java.lang.StringBuffer format(long number, @libcore.util.NonN… in format() argument

123