Home
last modified time | relevance | path

Searched refs:value (Results 1 – 25 of 723) sorted by relevance

12345678910>>...29

/libcore/ojluni/src/main/java/sun/net/ftp/
DFtpReplyCode.java87 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/
DJSON.java30 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 …]
DJSONStringer.java236 public JSONStringer value(Object value) throws JSONException { in value() argument
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/
DBigIntegerToStringTest.java36 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/
DAnnotationMember.java91 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/
DOptional.java55 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 …]
DOptionalInt.java55 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 …]
DOptionalLong.java55 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 …]
DOptionalDouble.java55 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 …]
DStringJoiner.java76 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/
DObjects.java42 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/
DSpliteratorsTest.java42 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/
DAbstractStringBuilder.java51 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 …]
DFloat.java498 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 …]
DDouble.java584 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 …]
DShort.java299 private final short value; field in Short
314 public Short(short value) { in Short() argument
315 this.value = value; in Short()
338 this.value = parseShort(s, 10); in Short()
347 return (byte)value; in byteValue()
357 return value; in shortValue()
366 return (int)value; in intValue()
375 return (long)value; in longValue()
384 return (float)value; in floatValue()
393 return (double)value; in doubleValue()
[all …]
DByte.java295 private final byte value; field in Byte
310 public Byte(byte value) { in Byte() argument
311 this.value = value; in Byte()
334 this.value = parseByte(s, 10); in Byte()
344 return value; in byteValue()
353 return (short)value; in shortValue()
362 return (int)value; in intValue()
371 return (long)value; in longValue()
380 return (float)value; in floatValue()
389 return (double)value; in doubleValue()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
DDOMConfigurationImpl.java64 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/sun/security/util/
DPropertyExpander.java53 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/dom/src/test/java/org/w3c/domts/
DDocumentBuilderSettingStrategy.java39 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/test/java/tests/org/w3c/dom/
DDocumentBuilderSettingStrategy.java20 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/luni/src/main/java/libcore/io/
DMemory.java147 … public static void pokeInt(@NonNull byte[] dst, int offset, int value, @NonNull ByteOrder order) { in pokeInt() argument
149 dst[offset++] = (byte) ((value >> 24) & 0xff); in pokeInt()
150 dst[offset++] = (byte) ((value >> 16) & 0xff); in pokeInt()
151 dst[offset++] = (byte) ((value >> 8) & 0xff); in pokeInt()
152 dst[offset ] = (byte) ((value >> 0) & 0xff); in pokeInt()
154 dst[offset++] = (byte) ((value >> 0) & 0xff); in pokeInt()
155 dst[offset++] = (byte) ((value >> 8) & 0xff); in pokeInt()
156 dst[offset++] = (byte) ((value >> 16) & 0xff); in pokeInt()
157 dst[offset ] = (byte) ((value >> 24) & 0xff); in pokeInt()
174 …public static void pokeLong(@NonNull byte[] dst, int offset, long value, @NonNull ByteOrder order)… in pokeLong() argument
[all …]
/libcore/json/src/test/java/libcore/org/json/
DJSONStringerTest.java39 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/math/
DMutableBigInteger.java55 int[] value; field in MutableBigInteger
103 value = new int[1]; in MutableBigInteger()
112 value = new int[1]; in MutableBigInteger()
114 value[0] = val; in MutableBigInteger()
122 value = val; in MutableBigInteger()
132 value = Arrays.copyOf(b.mag, intLen); in MutableBigInteger()
141 value = Arrays.copyOfRange(val.value, val.offset, val.offset + intLen); in MutableBigInteger()
151 if (n > value.length) in ones()
152 value = new int[n]; in ones()
153 Arrays.fill(value, -1); in ones()
[all …]
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestFractionPrinterParser.java180 …public void test_print_nanos(int minWidth, int maxWidth, int value, String result) throws Exceptio… in test_print_nanos() argument
181 …ANO_OF_SECOND, minWidth, maxWidth, true).formatTo(new MockFieldValue(NANO_OF_SECOND, value), buf); in test_print_nanos()
189 …public void test_print_nanos_noDecimalPoint(int minWidth, int maxWidth, int value, String result) … in test_print_nanos_noDecimalPoint() argument
190 …NO_OF_SECOND, minWidth, maxWidth, false).formatTo(new MockFieldValue(NANO_OF_SECOND, value), buf); in test_print_nanos_noDecimalPoint()
222 …public void test_print_seconds(int minWidth, int maxWidth, int value, String result) throws Except… in test_print_seconds() argument
223 …ND_OF_MINUTE, minWidth, maxWidth, true).formatTo(new MockFieldValue(SECOND_OF_MINUTE, value), buf); in test_print_seconds()
231 …public void test_print_seconds_noDecimalPoint(int minWidth, int maxWidth, int value, String result… in test_print_seconds_noDecimalPoint() argument
232 …D_OF_MINUTE, minWidth, maxWidth, false).formatTo(new MockFieldValue(SECOND_OF_MINUTE, value), buf); in test_print_seconds_noDecimalPoint()
243 …public void test_reverseParse(int minWidth, int maxWidth, int value, String result) throws Excepti… in test_reverseParse() argument
245 int expectedValue = fixParsedValue(maxWidth, value); in test_reverseParse()
[all …]

12345678910>>...29