/libcore/ojluni/src/main/java/sun/net/ftp/ |
D | FtpReplyCode.java | 87 private final int value; field in FtpReplyCode 90 this.value = val; in FtpReplyCode() 99 return value; in getValue() 110 return value >= 100 && value < 200; in isPositivePreliminary() 121 return value >= 200 && value < 300; in isPositiveCompletion() 132 return value >= 300 && value < 400; in isPositiveIntermediate() 143 return value >= 400 && value < 500; in isTransientNegative() 154 return value >= 500 && value < 600; in isPermanentNegative() 165 return value >= 600 && value < 700; in isProtectedReply() 176 return ((value / 10) - ((value / 100) * 10)) == 0; in isSyntax() [all …]
|
/libcore/json/src/main/java/org/json/ |
D | JSON.java | 30 static Boolean toBoolean(Object value) { in toBoolean() argument 31 if (value instanceof Boolean) { in toBoolean() 32 return (Boolean) value; in toBoolean() 33 } else if (value instanceof String) { in toBoolean() 34 String stringValue = (String) value; in toBoolean() 44 static Double toDouble(Object value) { in toDouble() argument 45 if (value instanceof Double) { in toDouble() 46 return (Double) value; in toDouble() 47 } else if (value instanceof Number) { in toDouble() 48 return ((Number) value).doubleValue(); in toDouble() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigIntegerToStringTest.java | 36 String value = "442429234853876401"; in testRadixOutOfRange() local 38 BigInteger aNumber = new BigInteger(value, radix); in testRadixOutOfRange() 40 assertTrue(result.equals(value)); in testRadixOutOfRange() 47 …String value = "-101001100010010001001010101110000101010110001010010101010101010101010101010101010… in testRadix2Neg() local 49 BigInteger aNumber = new BigInteger(value, radix); in testRadix2Neg() 51 assertTrue(result.equals(value)); in testRadix2Neg() 58 …String value = "1010000111110000001101010101010101010100010010101010101010100101010101010100001000… in testRadix2Pos() local 60 BigInteger aNumber = new BigInteger(value, radix); in testRadix2Pos() 62 assertTrue(result.equals(value)); in testRadix2Pos() 69 String value = "-2489756308572364789878394872984"; in testRadix10Neg() local [all …]
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | AnnotationMember.java | 91 protected final Object value; // a primitive value is wrapped to the corresponding wrapper class field in AnnotationMember 110 value = val == null ? NO_VALUE : val; in AnnotationMember() 111 if (value instanceof Throwable) { in AnnotationMember() 113 } else if (value.getClass().isArray()) { in AnnotationMember() 171 int len = Array.getLength(value); in toString() 174 sb.append(Array.get(value, i)); in toString() 178 return name+ "=" +value; in toString() 202 return equalArrayValue(that.value); in equals() 207 return value.equals(that.value); in equals() 223 if (value instanceof Object[] && otherValue instanceof Object[]) { in equalArrayValue() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Optional.java | 54 private final T value; field in Optional 63 this.value = null; in Optional() 90 private Optional(T value) { in Optional() argument 91 this.value = Objects.requireNonNull(value); in Optional() 102 public static <T> Optional<T> of(T value) { in of() argument 103 return new Optional<>(value); in of() 115 public static <T> Optional<T> ofNullable(T value) { in ofNullable() argument 116 return value == null ? empty() : of(value); in ofNullable() 129 if (value == null) { in get() 132 return value; in get() [all …]
|
D | OptionalInt.java | 54 private final int value; field in OptionalInt 64 this.value = 0; in OptionalInt() 87 private OptionalInt(int value) { in OptionalInt() argument 90 this.value = value; in OptionalInt() 99 public static OptionalInt of(int value) { in of() argument 100 return new OptionalInt(value); in of() 116 return value; in getAsInt() 138 consumer.accept(value); in ifPresent() 148 return isPresent ? value : other; in orElse() 162 return isPresent ? value : other.getAsInt(); in orElseGet() [all …]
|
D | OptionalDouble.java | 54 private final double value; field in OptionalDouble 64 this.value = Double.NaN; in OptionalDouble() 87 private OptionalDouble(double value) { in OptionalDouble() argument 89 this.value = value; in OptionalDouble() 98 public static OptionalDouble of(double value) { in of() argument 99 return new OptionalDouble(value); in of() 115 return value; in getAsDouble() 137 consumer.accept(value); in ifPresent() 147 return isPresent ? value : other; in orElse() 161 return isPresent ? value : other.getAsDouble(); in orElseGet() [all …]
|
D | OptionalLong.java | 54 private final long value; field in OptionalLong 64 this.value = 0; in OptionalLong() 87 private OptionalLong(long value) { in OptionalLong() argument 89 this.value = value; in OptionalLong() 98 public static OptionalLong of(long value) { in of() argument 99 return new OptionalLong(value); in of() 115 return value; in getAsLong() 137 consumer.accept(value); in ifPresent() 147 return isPresent ? value : other; in orElse() 161 return isPresent ? value : other.getAsLong(); in orElseGet() [all …]
|
D | StringJoiner.java | 76 private StringBuilder value; field in StringJoiner 161 if (value == null) { in toString() 165 return value.toString(); in toString() 167 int initialLength = value.length(); in toString() 168 String result = value.append(suffix).toString(); in toString() 170 value.setLength(initialLength); in toString() 210 if (other.value != null) { in merge() 211 final int length = other.value.length(); in merge() 216 builder.append(other.value, other.prefix.length(), length); in merge() 222 if (value != null) { in prepareBuilder() [all …]
|
/libcore/luni/src/main/java/libcore/util/ |
D | Objects.java | 53 Object value = f.get(o); in toString() local 62 if (value.getClass().isArray()) { in toString() 63 if (value.getClass() == boolean[].class) { in toString() 64 sb.append(Arrays.toString((boolean[]) value)); in toString() 65 } else if (value.getClass() == byte[].class) { in toString() 66 sb.append(Arrays.toString((byte[]) value)); in toString() 67 } else if (value.getClass() == char[].class) { in toString() 68 sb.append(Arrays.toString((char[]) value)); in toString() 69 } else if (value.getClass() == double[].class) { in toString() 70 sb.append(Arrays.toString((double[]) value)); in toString() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | SpliteratorsTest.java | 42 IntConsumer alwaysFails = (int value) -> fail(); in testEmptyIntSpliterator() 43 Consumer<Integer> alwaysFailsBoxed = (Integer value) -> fail(); in testEmptyIntSpliterator() 59 Consumer<Object> alwaysFails = (Object value) -> fail(); in testEmptyRefSpliterator() 72 LongConsumer alwaysFails = (long value) -> fail(); in testEmptyLongSpliterator() 73 Consumer<Long> alwaysFailsBoxed = (Long value) -> fail(); in testEmptyLongSpliterator() 89 DoubleConsumer alwaysFails = (double value) -> fail(); in testEmptyDoubleSpliterator() 90 Consumer<Double> alwaysFailsBoxed = (Double value) -> fail(); in testEmptyDoubleSpliterator() 219 assertTrue(intSp.tryAdvance((Integer value) -> assertEquals(1, (int) value))); in test_spliterator_int() 220 assertTrue(intSp.tryAdvance((int value) -> assertEquals(2, (int) value))); in test_spliterator_int() 229 assertTrue(split1.tryAdvance((int value) -> recorder.add(value))); in test_spliterator_int() [all …]
|
/libcore/ojluni/src/main/java/java/lang/reflect/ |
D | Array.java | 441 …public static void set(Object array, int index, Object value) throws IllegalArgumentException, Arr… in set() argument 447 if (value != null && !array.getClass().getComponentType().isInstance(value)) { in set() 450 ((Object[]) array)[index] = value; in set() 452 if (value == null) { in set() 455 if (value instanceof Boolean) { in set() 456 setBoolean(array, index, ((Boolean) value).booleanValue()); in set() 457 } else if (value instanceof Byte) { in set() 458 setByte(array, index, ((Byte) value).byteValue()); in set() 459 } else if (value instanceof Character) { in set() 460 setChar(array, index, ((Character) value).charValue()); in set() [all …]
|
/libcore/dex/src/main/java/com/android/dex/ |
D | Leb128.java | 37 public static int unsignedLeb128Size(int value) { in unsignedLeb128Size() argument 40 int remaining = value >> 7; in unsignedLeb128Size() 58 public static int signedLeb128Size(int value) { in signedLeb128Size() argument 61 int remaining = value >> 7; in signedLeb128Size() 64 int end = ((value & Integer.MIN_VALUE) == 0) ? 0 : -1; in signedLeb128Size() 68 || ((remaining & 1) != ((value >> 6) & 1)); in signedLeb128Size() 70 value = remaining; in signedLeb128Size() 131 public static void writeUnsignedLeb128(ByteOutput out, int value) { in writeUnsignedLeb128() argument 132 int remaining = value >>> 7; in writeUnsignedLeb128() 135 out.writeByte((byte) ((value & 0x7f) | 0x80)); in writeUnsignedLeb128() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Float.java | 505 private final float value; field in Float 513 public Float(float value) { in Float() argument 514 this.value = value; in Float() 523 public Float(double value) { in Float() argument 524 this.value = (float)value; in Float() 551 return isNaN(value); in isNaN() 563 return isInfinite(value); in isInfinite() 576 return Float.toString(value); in toString() 587 return (byte)value; in byteValue() 599 return (short)value; in shortValue() [all …]
|
D | AbstractStringBuilder.java | 47 char[] value; field in AbstractStringBuilder 64 value = new char[capacity]; in AbstractStringBuilder() 85 return value.length; in capacity() 113 if (minimumCapacity - value.length > 0) in ensureCapacityInternal() 122 int newCapacity = value.length * 2 + 2; in expandCapacity() 130 value = Arrays.copyOf(value, newCapacity); in expandCapacity() 141 if (count < value.length) { in trimToSize() 142 value = Arrays.copyOf(value, count); in trimToSize() 178 value[count] = '\0'; in setLength() 204 return value[index]; in charAt() [all …]
|
D | Short.java | 294 private final short value; field in Short 303 public Short(short value) { in Short() argument 304 this.value = value; in Short() 321 this.value = parseShort(s, 10); in Short() 329 return (byte)value; in byteValue() 337 return value; in shortValue() 345 return (int)value; in intValue() 353 return (long)value; in longValue() 361 return (float)value; in floatValue() 369 return (double)value; in doubleValue() [all …]
|
D | Byte.java | 289 private final byte value; field in Byte 298 public Byte(byte value) { in Byte() argument 299 this.value = value; in Byte() 316 this.value = parseByte(s, 10); in Byte() 324 return value; in byteValue() 332 return (short)value; in shortValue() 340 return (int)value; in intValue() 348 return (long)value; in longValue() 356 return (float)value; in floatValue() 364 return (double)value; in doubleValue() [all …]
|
D | Double.java | 593 private final double value; field in Double 601 public Double(double value) { in Double() argument 602 this.value = value; in Double() 629 return isNaN(value); in isNaN() 641 return isInfinite(value); in isInfinite() 654 return toString(value); in toString() 666 return (byte)value; in byteValue() 678 return (short)value; in shortValue() 689 return (int)value; in intValue() 700 return (long)value; in longValue() [all …]
|
/libcore/support/src/test/java/tests/util/ |
D | CallVerificationStack.java | 212 Boolean value = (Boolean) wrapper.getValue(); in popBoolean() local 213 return value.booleanValue(); in popBoolean() 223 Character value = (Character) wrapper.getValue(); in popChar() local 224 return value.charValue(); in popChar() 234 Double value = (Double) wrapper.getValue(); in popDouble() local 235 return value.doubleValue(); in popDouble() 245 Float value = (Float) wrapper.getValue(); in popFloat() local 246 return value.floatValue(); in popFloat() 256 Integer value = (Integer) wrapper.getValue(); in popInt() local 257 return value.intValue(); in popInt() [all …]
|
/libcore/luni/src/main/java/libcore/io/ |
D | Memory.java | 91 public static void pokeInt(byte[] dst, int offset, int value, ByteOrder order) { in pokeInt() argument 93 dst[offset++] = (byte) ((value >> 24) & 0xff); in pokeInt() 94 dst[offset++] = (byte) ((value >> 16) & 0xff); in pokeInt() 95 dst[offset++] = (byte) ((value >> 8) & 0xff); in pokeInt() 96 dst[offset ] = (byte) ((value >> 0) & 0xff); in pokeInt() 98 dst[offset++] = (byte) ((value >> 0) & 0xff); in pokeInt() 99 dst[offset++] = (byte) ((value >> 8) & 0xff); in pokeInt() 100 dst[offset++] = (byte) ((value >> 16) & 0xff); in pokeInt() 101 dst[offset ] = (byte) ((value >> 24) & 0xff); in pokeInt() 105 public static void pokeLong(byte[] dst, int offset, long value, ByteOrder order) { in pokeLong() argument [all …]
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | PropertyExpander.java | 53 public static String expand(String value) in expand() argument 56 return expand(value, false); in expand() 59 public static String expand(String value, boolean encodeURL) in expand() argument 62 if (value == null) in expand() 65 int p = value.indexOf("${", 0); in expand() 68 if (p == -1) return value; in expand() 70 StringBuffer sb = new StringBuffer(value.length()); in expand() 71 int max = value.length(); in expand() 78 sb.append(value.substring(i, p)); in expand() 84 if (pe < max && value.charAt(pe) == '{') { in expand() [all …]
|
/libcore/luni/src/test/java/tests/org/w3c/dom/ |
D | DocumentBuilderSettingStrategy.java | 20 boolean value); in applySetting() argument 26 boolean value) { 27 factory.setCoalescing(value); 37 public void applySetting(DocumentBuilderFactory factory, boolean value) { 38 factory.setExpandEntityReferences(value); 47 public void applySetting(DocumentBuilderFactory factory, boolean value) { 48 factory.setIgnoringElementContentWhitespace(value); 57 public void applySetting(DocumentBuilderFactory factory, boolean value) { 58 if (value) { 69 public void applySetting(DocumentBuilderFactory factory, boolean value) [all …]
|
/libcore/dom/src/test/java/org/w3c/domts/ |
D | DocumentBuilderSettingStrategy.java | 39 boolean value) throws DOMTestIncompatibleException; in applySetting() argument 45 public void applySetting(DocumentBuilderFactory factory, boolean value) 47 factory.setCoalescing(value); 59 public void applySetting(DocumentBuilderFactory factory, boolean value) 61 factory.setExpandEntityReferences(value); 72 public void applySetting(DocumentBuilderFactory factory, boolean value) 74 factory.setIgnoringElementContentWhitespace(value); 84 public void applySetting(DocumentBuilderFactory factory, boolean value) 86 if (value) { 100 public void applySetting(DocumentBuilderFactory factory, boolean value) throws [all …]
|
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/ |
D | DOMConfigurationImpl.java | 64 public void set(DOMConfigurationImpl config, Object value) { 65 config.cdataSections = (Boolean) value; 81 public void set(DOMConfigurationImpl config, Object value) { 82 config.comments = (Boolean) value; 94 public void set(DOMConfigurationImpl config, Object value) { 95 if ((Boolean) value) { 117 public void set(DOMConfigurationImpl config, Object value) { 118 config.entities = (Boolean) value; 129 public void set(DOMConfigurationImpl config, Object value) { 130 config.errorHandler = (DOMErrorHandler) value; [all …]
|
/libcore/ojluni/src/main/java/java/util/function/ |
D | DoublePredicate.java | 50 boolean test(double value); in test() argument 70 return (value) -> test(value) && other.test(value); in and() 81 return (value) -> !test(value); in negate() 102 return (value) -> test(value) || other.test(value); in or()
|