/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 …]
|
D | JSONStringer.java | 236 public JSONStringer value(Object value) throws JSONException { in value() method in JSONStringer 241 if (value instanceof JSONArray) { in value() 242 ((JSONArray) value).writeTo(this); in value() 245 } else if (value instanceof JSONObject) { in value() 246 ((JSONObject) value).writeTo(this); in value() 252 if (value == null in value() 253 || value instanceof Boolean in value() 254 || value == JSONObject.NULL) { in value() 255 out.append(value); in value() 257 } else if (value instanceof Number) { in value() [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 | 55 private final T value; field in Optional 64 this.value = null; in Optional() 91 private Optional(T value) { in Optional() argument 92 this.value = Objects.requireNonNull(value); in Optional() 103 public static <T> Optional<T> of(T value) { in of() argument 104 return new Optional<>(value); in of() 116 public static <T> Optional<T> ofNullable(T value) { in ofNullable() argument 117 return value == null ? empty() : of(value); in ofNullable() 130 if (value == null) { in get() 133 return value; in get() [all …]
|
D | OptionalInt.java | 55 private final int value; field in OptionalInt 65 this.value = 0; in OptionalInt() 88 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 | OptionalLong.java | 55 private final long value; field in OptionalLong 65 this.value = 0; in OptionalLong() 88 private OptionalLong(long value) { in OptionalLong() argument 90 this.value = value; in OptionalLong() 99 public static OptionalLong of(long value) { in of() argument 100 return new OptionalLong(value); in of() 116 return value; in getAsLong() 138 consumer.accept(value); in ifPresent() 148 return isPresent ? value : other; in orElse() 162 return isPresent ? value : other.getAsLong(); in orElseGet() [all …]
|
D | OptionalDouble.java | 55 private final double value; field in OptionalDouble 65 this.value = Double.NaN; in OptionalDouble() 88 private OptionalDouble(double value) { in OptionalDouble() argument 90 this.value = value; in OptionalDouble() 99 public static OptionalDouble of(double value) { in of() argument 100 return new OptionalDouble(value); in of() 116 return value; in getAsDouble() 138 consumer.accept(value); in ifPresent() 148 return isPresent ? value : other; in orElse() 162 return isPresent ? value : other.getAsDouble(); 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 | 42 Object value = f.get(o); in toString() local 51 if (value.getClass().isArray()) { in toString() 52 if (value.getClass() == boolean[].class) { in toString() 53 sb.append(Arrays.toString((boolean[]) value)); in toString() 54 } else if (value.getClass() == byte[].class) { in toString() 55 sb.append(Arrays.toString((byte[]) value)); in toString() 56 } else if (value.getClass() == char[].class) { in toString() 57 sb.append(Arrays.toString((char[]) value)); in toString() 58 } else if (value.getClass() == double[].class) { in toString() 59 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/ |
D | AbstractStringBuilder.java | 51 char[] value; field in AbstractStringBuilder 68 value = new char[capacity]; in AbstractStringBuilder() 90 return value.length; in capacity() 123 if (minimumCapacity - value.length > 0) { in ensureCapacityInternal() 124 value = Arrays.copyOf(value, in ensureCapacityInternal() 150 int newCapacity = (value.length << 1) + 2; in newCapacity() 175 if (count < value.length) { in trimToSize() 176 value = Arrays.copyOf(value, count); in trimToSize() 211 Arrays.fill(value, count, newLength, '\0'); in setLength() 238 return value[index]; in charAt() [all …]
|
D | Float.java | 498 private final float value; field in Float 506 public Float(float value) { in Float() argument 507 this.value = value; in Float() 516 public Float(double value) { in Float() argument 517 this.value = (float)value; in Float() 532 value = parseFloat(s); in Float() 543 return isNaN(value); in isNaN() 555 return isInfinite(value); in isInfinite() 568 return Float.toString(value); in toString() 580 return (byte)value; in byteValue() [all …]
|
D | Double.java | 584 private final double value; field in Double 592 public Double(double value) { in Double() argument 593 this.value = value; in Double() 608 value = parseDouble(s); in Double() 619 return isNaN(value); in isNaN() 631 return isInfinite(value); in isInfinite() 644 return toString(value); in toString() 657 return (byte)value; in byteValue() 670 return (short)value; in shortValue() 682 return (int)value; in intValue() [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() 330 return (byte)value; in byteValue() 338 return value; in shortValue() 347 return (int)value; in intValue() 356 return (long)value; in longValue() 365 return (float)value; in floatValue() 374 return (double)value; in doubleValue() [all …]
|
D | Byte.java | 291 private final byte value; field in Byte 300 public Byte(byte value) { in Byte() argument 301 this.value = value; in Byte() 318 this.value = parseByte(s, 10); in Byte() 326 return value; in byteValue() 335 return (short)value; in shortValue() 344 return (int)value; in intValue() 353 return (long)value; in longValue() 362 return (float)value; in floatValue() 371 return (double)value; in doubleValue() [all …]
|
/libcore/luni/src/main/java/libcore/io/ |
D | Memory.java | 98 public static void pokeInt(byte[] dst, int offset, int value, ByteOrder order) { in pokeInt() argument 100 dst[offset++] = (byte) ((value >> 24) & 0xff); in pokeInt() 101 dst[offset++] = (byte) ((value >> 16) & 0xff); in pokeInt() 102 dst[offset++] = (byte) ((value >> 8) & 0xff); in pokeInt() 103 dst[offset ] = (byte) ((value >> 0) & 0xff); in pokeInt() 105 dst[offset++] = (byte) ((value >> 0) & 0xff); in pokeInt() 106 dst[offset++] = (byte) ((value >> 8) & 0xff); in pokeInt() 107 dst[offset++] = (byte) ((value >> 16) & 0xff); in pokeInt() 108 dst[offset ] = (byte) ((value >> 24) & 0xff); in pokeInt() 113 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/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/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/json/src/test/java/libcore/org/json/ |
D | JSONStringerTest.java | 39 stringer.value(JSONObject.NULL); in testValueJSONNull() 61 stringer.value(false); in testArray() 62 stringer.value(5.0); in testArray() 63 stringer.value(5L); in testArray() 64 stringer.value("five"); in testArray() 65 stringer.value(null); in testArray() 73 stringer.value(Boolean.FALSE); in testValueObjectMethods() 74 stringer.value(Double.valueOf(5.0)); in testValueObjectMethods() 75 stringer.value(Long.valueOf(5L)); in testValueObjectMethods() 83 stringer.key("a").value(false); in testKeyValue() [all …]
|
/libcore/ojluni/src/main/java/java/util/function/ |
D | IntPredicate.java | 50 boolean test(int 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()
|
D | LongPredicate.java | 50 boolean test(long 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()
|