Searched refs:Long (Results 1 - 25 of 117) sorted by relevance

12345

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DLongTest.java37 * java.lang.Long#byteValue()
40 // Test for method byte java.lang.Long.byteValue()
41 Long l = new Long(127);
43 assertEquals("Returned incorrect byte value", -1, new Long(Long.MAX_VALUE)
48 * java.lang.Long#compareTo(java.lang.Long)
51 // Test for method int java.lang.Long.compareTo(java.lang.Long)
[all...]
/libcore/luni/src/test/java/libcore/java/lang/
H A DLongTest.java29 assertNull(Long.getLong("testIncLong"));
30 assertEquals(new Long(4), Long.getLong("testIncLong", 4L));
31 assertEquals(new Long(4), Long.getLong("testIncLong", new Long(4)));
38 final long min = Long.MIN_VALUE;
40 final long max = Long.MAX_VALUE;
41 assertTrue(Long.compare(max, max) == 0);
42 assertTrue(Long
[all...]
/libcore/luni/src/main/java/java/lang/
H A DLong.java33 public final class Long extends Number implements Comparable<Long> { class in inherits:Number,Comparable
56 public static final Class<Long> TYPE
57 = (Class<Long>) long[].class.getComponentType();
58 // Note: Long.TYPE can't be set to "long.class", since *that* is
59 // defined to be "java.lang.Long.TYPE";
70 * Constructs a new {@code Long} with the specified primitive long value.
75 public Long(long value) { method in class:Long
80 * Constructs a new {@code Long} from the specified string.
88 public Long(Strin method in class:Long
[all...]
H A DHexStringParser.java141 exponent = expSign * Long.parseLong(exponentStr);
144 exponent = expSign * Long.MAX_VALUE;
180 mantissa = Long.parseLong(significand, HEX_RADIX);
201 * Sets the exponent variable to Long.MAX_VALUE or -Long.MAX_VALUE if
206 int expSign = Long.signum(exponent);
207 if (expSign * Long.signum(offset) > 0 && expSign * Long.signum(result) < 0) {
208 exponent = expSign * Long.MAX_VALUE;
300 return (strIntegerPart.length() - 1) * 4 + countBitsLength(Long
[all...]
H A DAssertionError.java101 this(Long.toString(detailMessage));
H A DDouble.java451 String hexSignificand = Long.toHexString(significand);
473 String hexSignificand = Long.toHexString(significand);
486 hexString.append(Long.toString(exponent - 1023));
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
H A DNumberFormatTest.java42 out = format.format(new Long(Long.MAX_VALUE), new StringBuffer(), pos);
47 out = format.format(new Long(Long.MIN_VALUE), new StringBuffer(), pos);
53 .valueOf(Long.MAX_VALUE)), new StringBuffer(), pos);
59 .valueOf(Long.MIN_VALUE)), new StringBuffer(), pos);
65 big = new java.math.BigInteger(String.valueOf(Long.MAX_VALUE))
72 big = new java.math.BigInteger(String.valueOf(Long.MIN_VALUE))
103 format.format(new Long(0), null, pos);
110 format.format(new Long(
[all...]
/libcore/benchmarks/src/benchmarks/regression/
H A DDoubleBenchmark.java33 throw new RuntimeException(Long.toString(result));
43 throw new RuntimeException(Long.toString(result));
/libcore/luni/src/main/java/java/util/
H A DHugeEnumSet.java101 int ordinal = Long.numberOfTrailingZeros(mask) + index * BIT_IN_LONG;
153 size += Long.bitCount(newBits) - Long.bitCount(oldBits);
184 size += Long.bitCount(b);
284 size += Long.bitCount(newBits) - Long.bitCount(oldBits);
313 size += Long.bitCount(newBits) - Long.bitCount(oldBits);
334 size -= Long.bitCount(bits[startIndex]);
336 size += Long
[all...]
H A DUUID.java190 long m1 = Long.parsePositiveLong(parts[0], 16);
191 long m2 = Long.parsePositiveLong(parts[1], 16);
192 long m3 = Long.parsePositiveLong(parts[2], 16);
194 long lsb1 = Long.parsePositiveLong(parts[3], 16);
195 long lsb2 = Long.parsePositiveLong(parts[4], 16);
409 String msbStr = Long.toHexString(mostSigBits);
420 String lsbStr = Long.toHexString(leastSigBits);
H A DMiniEnumSet.java72 int ordinal = Long.numberOfTrailingZeros(mask);
133 size = Long.bitCount(newBits);
180 size = Long.bitCount(newBits);
206 size = Long.bitCount(newBits);
259 size = Long.bitCount(bits);
/libcore/json/src/main/java/org/json/
H A DJSON.java72 static Long toLong(Object value) {
73 if (value instanceof Long) {
74 return (Long) value;
/libcore/luni/src/test/java/libcore/java/math/
H A DBigDecimalTest.java46 String maxLong = Long.toString(Long.MAX_VALUE);
48 String minLong = Long.toString(Long.MIN_VALUE);
/libcore/luni/src/test/java/libcore/java/sql/
H A DTimestampTest.java32 Timestamp t1 = new Timestamp(Long.MIN_VALUE);
35 Timestamp t2 = new Timestamp(Long.MIN_VALUE + 1);
38 Timestamp t3 = new Timestamp(Long.MIN_VALUE + 807);
41 Timestamp t4 = new Timestamp(Long.MIN_VALUE + 808);
/libcore/luni/src/test/java/libcore/java/text/
H A DNumberFormatTest.java61 assertEquals("long", nf.format(BigInteger.valueOf(Long.MAX_VALUE)));
62 assertEquals("double", nf.format(BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.ONE)));
63 assertEquals("long", nf.format(BigInteger.valueOf(Long.MIN_VALUE)));
64 assertEquals("double", nf.format(BigInteger.valueOf(Long.MIN_VALUE).subtract(BigInteger.ONE)));
/libcore/luni/src/test/java/libcore/java/util/
H A DRandomTest.java32 @Override public synchronized void setSeed(long seed) { state = Long.toString(seed); }
/libcore/luni/src/test/java/libcore/java/io/
H A DRandomAccessFileTest.java41 raf.seek(Long.MAX_VALUE);
50 raf.setLength(Long.MAX_VALUE);
/libcore/jsr166-tests/src/test/java/jsr166/
H A DTimeUnitTest.java276 * convert saturates positive too-large values to Long.MAX_VALUE
280 assertEquals(Long.MAX_VALUE,
281 TimeUnit.NANOSECONDS.convert(Long.MAX_VALUE / 2,
283 assertEquals(Long.MIN_VALUE,
284 TimeUnit.NANOSECONDS.convert(-Long.MAX_VALUE / 4,
286 assertEquals(Long.MAX_VALUE,
287 TimeUnit.NANOSECONDS.convert(Long.MAX_VALUE / 2,
289 assertEquals(Long.MIN_VALUE,
290 TimeUnit.NANOSECONDS.convert(-Long.MAX_VALUE / 4,
292 assertEquals(Long
[all...]
/libcore/dex/src/main/java/com/android/dex/
H A DEncodedValueCodec.java42 int requiredBits = 65 - Long.numberOfLeadingZeros(value ^ (value >> 63));
66 int requiredBits = 64 - Long.numberOfLeadingZeros(value);
93 int requiredBits = 64 - Long.numberOfTrailingZeros(value);
/libcore/luni/src/main/java/java/nio/channels/
H A DFileChannel.java163 * {@code fileChannel.lock(0L, Long.MAX_VALUE, false);}
185 return lock(0L, Long.MAX_VALUE, false);
567 * {@code fileChannel.tryLock(0L, Long.MAX_VALUE, false);}
584 return tryLock(0L, Long.MAX_VALUE, false);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DFormatterTest.java1470 * Byte/Short/Integer/Long conversion type 'd'
1568 * Byte/Short/Integer/Long conversion type 'o'
1638 * Byte/Short/Integer/Long conversion type 'x' and 'X'
1732 { Long.MAX_VALUE, 'a', "So." }, //$NON-NLS-2$
1738 { Long.MAX_VALUE, 'b', "Aug" }, //$NON-NLS-2$
1744 { Long.MAX_VALUE, 'c', "So. Aug 17 15:18:47 GMT+08:00 292278994" }, //$NON-NLS-2$
1750 { Long.MAX_VALUE, 'd', "17" }, //$NON-NLS-2$
1756 { Long.MAX_VALUE, 'e', "17" }, //$NON-NLS-2$
1762 { Long.MAX_VALUE, 'h', "Aug" }, //$NON-NLS-2$
1768 { Long
[all...]
H A DUUIDTest.java47 uuid = new UUID(0, Long.MIN_VALUE);
48 assertEquals(Long.MIN_VALUE, uuid.getLeastSignificantBits());
49 uuid = new UUID(0, Long.MAX_VALUE);
50 assertEquals(Long.MAX_VALUE, uuid.getLeastSignificantBits());
59 uuid = new UUID(Long.MIN_VALUE, 0);
60 assertEquals(Long.MIN_VALUE, uuid.getMostSignificantBits());
61 uuid = new UUID(Long.MAX_VALUE, 0);
62 assertEquals(Long.MAX_VALUE, uuid.getMostSignificantBits());
/libcore/support/src/test/java/tests/util/
H A DCallVerificationStack.java267 Long value = (Long) wrapper.getValue();
336 this.value = new Long(val);
/libcore/dalvik/src/test/java/dalvik/system/profiler/
H A DSamplingProfilerTest.java298 assertEquals(Long.toHexString(hprofData.getStartMillis()),
299 Long.toHexString(parsed.getStartMillis()));
300 assertEquals(Long.toHexString(hprofData.getFlags()),
301 Long.toHexString(parsed.getFlags()));
302 assertEquals(Long.toHexString(hprofData.getDepth()),
303 Long.toHexString(parsed.getDepth()));
/libcore/luni/src/test/java/libcore/java/util/prefs/
H A DOldAbstractPreferencesTest.java152 pref.putLong(keyArray[2], new Long(Long.MIN_VALUE));
248 pref.putLong("LongValue", new Long(Long.MIN_VALUE));
275 pref.putLong("LongValue", new Long(299792458));
278 assertEquals(299792458L, pref.getLong("LongValue", new Long(1)));
281 pref.putLong(null, new Long(1));
295 pref.putLong(new String(sb), new Long(1));
304 pref.putLong("LongValue", new Long(1));
314 pref.putLong("LongValue", new Long(Lon
[all...]

Completed in 755 milliseconds

12345