/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
D | MockFieldValue.java | 73 private final TemporalField field; field in MockFieldValue 76 public MockFieldValue(TemporalField field, long value) { in MockFieldValue() argument 77 this.field = field; in MockFieldValue() 82 public boolean isSupported(TemporalField field) { in isSupported() argument 83 return field != null && field.equals(this.field); in isSupported() 87 public ValueRange range(TemporalField field) { in range() argument 88 if (field instanceof ChronoField) { in range() 89 if (isSupported(field)) { in range() 90 return field.range(); in range() 92 throw new UnsupportedTemporalTypeException("Unsupported field: " + field); in range() [all …]
|
D | TestDateTimeBuilderCombinations.java | 113 public boolean isSupported(TemporalField field) { in test_derive() 114 return field == field1 || field == field2 || field == field3 || field == field4; in test_derive() 117 public long getLong(TemporalField field) { in test_derive() 118 if (field == field1) { in test_derive() 121 if (field == field2) { in test_derive() 124 if (field == field3) { in test_derive() 127 if (field == field4) { in test_derive() 190 public boolean isSupported(TemporalField field) { in test_normalized() 191 return field == field1; in test_normalized() 194 public long getLong(TemporalField field) { in test_normalized() [all …]
|
/libcore/ojluni/src/main/java/java/security/spec/ |
D | EllipticCurve.java | 45 private final ECField field; field in EllipticCurve 51 private static void checkValidity(ECField field, BigInteger c, in checkValidity() argument 54 if (field instanceof ECFieldFp) { in checkValidity() 55 BigInteger p = ((ECFieldFp)field).getP(); in checkValidity() 61 } else if (field instanceof ECFieldF2m) { in checkValidity() 62 int m = ((ECFieldF2m)field).getM(); in checkValidity() 81 public EllipticCurve(ECField field, BigInteger a, in EllipticCurve() argument 83 this(field, a, b, null); in EllipticCurve() 101 public EllipticCurve(ECField field, BigInteger a, in EllipticCurve() argument 103 if (field == null) { in EllipticCurve() [all …]
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | TemporalAccessor.java | 126 boolean isSupported(TemporalField field); in isSupported() argument 169 default ValueRange range(TemporalField field) { in range() argument 170 if (field instanceof ChronoField) { in range() 171 if (isSupported(field)) { in range() 172 return field.range(); in range() 174 throw new UnsupportedTemporalTypeException("Unsupported field: " + field); in range() 176 Objects.requireNonNull(field, "field"); in range() 177 return field.rangeRefinedBy(this); in range() 217 default int get(TemporalField field) { in get() argument 218 ValueRange range = range(field); in get() [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | AbstractDateTimeTest.java | 103 for (TemporalField field : validFields()) { in basicTest_isSupported_TemporalField_supported() 104 assertEquals(sample.isSupported(field), true, "Failed on " + sample + " " + field); in basicTest_isSupported_TemporalField_supported() local 112 for (TemporalField field : invalidFields()) { in basicTest_isSupported_TemporalField_unsupported() 113 assertEquals(sample.isSupported(field), false, "Failed on " + sample + " " + field); in basicTest_isSupported_TemporalField_unsupported() local 131 for (TemporalField field : validFields()) { in basicTest_range_TemporalField_supported() 132 sample.range(field); // no exception in basicTest_range_TemporalField_supported() 140 for (TemporalField field : invalidFields()) { in basicTest_range_TemporalField_unsupported() 142 sample.range(field); in basicTest_range_TemporalField_unsupported() 143 fail("Failed on " + sample + " " + field); in basicTest_range_TemporalField_unsupported() 169 for (TemporalField field : validFields()) { in basicTest_get_TemporalField_supported() [all …]
|
/libcore/libart/src/main/java/java/lang/invoke/ |
D | FieldVarHandle.java | 29 private FieldVarHandle(Field field, Class<?> coordinateType0) { in FieldVarHandle() argument 30 super(field.getType(), Modifier.isFinal(field.getModifiers()), coordinateType0); in FieldVarHandle() 31 artField = field.getArtField(); in FieldVarHandle() 34 protected FieldVarHandle(Field field) { in FieldVarHandle() argument 35 super(field.getType(), Modifier.isFinal(field.getModifiers())); in FieldVarHandle() 36 artField = field.getArtField(); in FieldVarHandle() 39 static FieldVarHandle create(Field field) { in create() argument 40 assert !Modifier.isStatic(field.getModifiers()); in create() 41 return new FieldVarHandle(field, field.getDeclaringClass()); in create()
|
/libcore/ojluni/src/main/java/java/text/ |
D | CalendarBuilder.java | 59 private final int[] field; field in CalendarBuilder 64 field = new int[MAX_FIELD * 2]; in CalendarBuilder() 74 field[index] = nextStamp++; in set() 75 field[MAX_FIELD + index] = value; in set() 83 field[MAX_FIELD + YEAR] += value; in addYear() 84 field[MAX_FIELD + WEEK_YEAR] += value; in addYear() 92 return field[index] > UNSET; in isSet() 99 field[index] = UNSET; in clear() 100 field[MAX_FIELD + index] = 0; in clear() 106 && field[WEEK_YEAR] > field[YEAR]; in establish() [all …]
|
D | FieldPosition.java | 80 int field = 0; field in FieldPosition 110 public FieldPosition(int field) { in FieldPosition() argument 111 this.field = field; in FieldPosition() 145 this.field = fieldID; in FieldPosition() 166 return field; in getField() 236 && field == other.field); in equals() 244 return (field << 24) | (beginIndex << 16) | endIndex; in hashCode() 253 "[field=" + field + ",attribute=" + attribute + in toString() 275 private boolean matchesField(Format.Field attribute, int field) { in matchesField() argument 279 return (field == this.field); in matchesField()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | Era.java | 145 default boolean isSupported(TemporalField field) { in isSupported() argument 146 if (field instanceof ChronoField) { in isSupported() 147 return field == ERA; in isSupported() 149 return field != null && field.isSupportedBy(this); in isSupported() 178 default ValueRange range(TemporalField field) { in range() argument 179 return TemporalAccessor.super.range(field); in range() 208 default int get(TemporalField field) { in get() argument 209 if (field == ERA) { in get() 212 return TemporalAccessor.super.get(field); in get() 238 default long getLong(TemporalField field) { in getLong() argument [all …]
|
D | ChronoLocalDateTimeImpl.java | 240 public boolean isSupported(TemporalField field) { in isSupported() argument 241 if (field instanceof ChronoField chronoField) { in isSupported() 244 return field != null && field.isSupportedBy(this); in isSupported() 248 public ValueRange range(TemporalField field) { in range() argument 249 if (field instanceof ChronoField chronoField) { in range() 250 return (chronoField.isTimeBased() ? time.range(field) : date.range(field)); in range() 252 return field.rangeRefinedBy(this); in range() 256 public int get(TemporalField field) { in get() argument 257 if (field instanceof ChronoField chronoField) { in get() 258 return (chronoField.isTimeBased() ? time.get(field) : date.get(field)); in get() [all …]
|
D | ChronoZonedDateTime.java | 186 default ValueRange range(TemporalField field) { in range() argument 187 if (field instanceof ChronoField) { in range() 188 if (field == INSTANT_SECONDS || field == OFFSET_SECONDS) { in range() 189 return field.range(); in range() 191 return toLocalDateTime().range(field); in range() 193 return field.rangeRefinedBy(this); in range() 197 default int get(TemporalField field) { in get() argument 198 if (field instanceof ChronoField chronoField) { in get() 205 return toLocalDateTime().get(field); in get() 207 return Temporal.super.get(field); in get() [all …]
|
/libcore/ojluni/src/main/java/java/time/ |
D | DayOfWeek.java | 251 public boolean isSupported(TemporalField field) { in isSupported() argument 252 if (field instanceof ChronoField) { in isSupported() 253 return field == DAY_OF_WEEK; in isSupported() 255 return field != null && field.isSupportedBy(this); in isSupported() 281 public ValueRange range(TemporalField field) { in range() argument 282 if (field == DAY_OF_WEEK) { in range() 283 return field.range(); in range() 285 return TemporalAccessor.super.range(field); in range() 314 public int get(TemporalField field) { in get() argument 315 if (field == DAY_OF_WEEK) { in get() [all …]
|
D | Month.java | 278 public boolean isSupported(TemporalField field) { in isSupported() argument 279 if (field instanceof ChronoField) { in isSupported() 280 return field == MONTH_OF_YEAR; in isSupported() 282 return field != null && field.isSupportedBy(this); in isSupported() 308 public ValueRange range(TemporalField field) { in range() argument 309 if (field == MONTH_OF_YEAR) { in range() 310 return field.range(); in range() 312 return TemporalAccessor.super.range(field); in range() 341 public int get(TemporalField field) { in get() argument 342 if (field == MONTH_OF_YEAR) { in get() [all …]
|
D | MonthDay.java | 344 public boolean isSupported(TemporalField field) { in isSupported() argument 345 if (field instanceof ChronoField) { in isSupported() 346 return field == MONTH_OF_YEAR || field == DAY_OF_MONTH; in isSupported() 348 return field != null && field.isSupportedBy(this); in isSupported() 375 public ValueRange range(TemporalField field) { in range() argument 376 if (field == MONTH_OF_YEAR) { in range() 377 return field.range(); in range() 378 } else if (field == DAY_OF_MONTH) { in range() 381 return TemporalAccessor.super.range(field); in range() 411 public int get(TemporalField field) { in get() argument [all …]
|
D | ZoneOffset.java | 524 public boolean isSupported(TemporalField field) { 525 if (field instanceof ChronoField) { 526 return field == OFFSET_SECONDS; 528 return field != null && field.isSupportedBy(this); 555 public ValueRange range(TemporalField field) { 556 return TemporalAccessor.super.range(field); 585 public int get(TemporalField field) { 586 if (field == OFFSET_SECONDS) { 588 } else if (field instanceof ChronoField) { 589 throw new UnsupportedTemporalTypeException("Unsupported field: " + field); [all …]
|
D | Year.java | 363 public boolean isSupported(TemporalField field) { in isSupported() argument 364 if (field instanceof ChronoField) { in isSupported() 365 return field == YEAR || field == YEAR_OF_ERA || field == ERA; in isSupported() 367 return field != null && field.isSupportedBy(this); in isSupported() 429 public ValueRange range(TemporalField field) { in range() argument 430 if (field == YEAR_OF_ERA) { in range() 433 return Temporal.super.range(field); in range() 463 public int get(TemporalField field) { in get() argument 464 return range(field).checkValidIntValue(getLong(field), field); in get() 491 public long getLong(TemporalField field) { in getLong() argument [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Calendar.java | 1159 public Builder set(int field, int value) { in set() argument 1161 if (field < 0 || field >= FIELD_COUNT) { in set() 1168 internalSet(field, value); in set() 1210 int field = fieldValuePairs[i++]; in setFields() local 1212 if (field < 0 || field >= FIELD_COUNT) { in setFields() 1215 internalSet(field, fieldValuePairs[i++]); in setFields() 1565 private void internalSet(int field, int value) { in internalSet() argument 1566 fields[field] = nextStamp++; in internalSet() 1570 fields[NFIELDS + field] = value; in internalSet() 1571 if (field > maxFieldIndex && field < WEEK_YEAR) { in internalSet() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | AbstractTest.java | 89 for (Field field : fields) { in assertImmutable() 90 if (field.getName().contains("$") == false) { in assertImmutable() 91 if (Modifier.isStatic(field.getModifiers())) { in assertImmutable() 92 assertTrue(Modifier.isFinal(field.getModifiers()), "Field:" + field.getName()); in assertImmutable() 94 … assertTrue(Modifier.isPrivate(field.getModifiers()), "Field:" + field.getName()); in assertImmutable() 95 assertTrue(Modifier.isFinal(field.getModifiers()), "Field:" + field.getName()); in assertImmutable()
|
/libcore/luni/src/test/java/libcore/java/time/ |
D | ZoneOffsetTest.java | 38 for (ChronoField field : ChronoField.values()) { in test_isSupported() 40 assertEquals("isSupported(" + field + ")", in test_isSupported() 41 field == ChronoField.OFFSET_SECONDS, OFFSET_P1.isSupported(field)); in test_isSupported() 58 for (ChronoField field : ChronoField.values()) { in test_range_unsupported() 60 if (field == ChronoField.OFFSET_SECONDS) { in test_range_unsupported() 64 OFFSET_P1.range(field); in test_range_unsupported() 65 fail("ZoneOffset.range(" + field + ") should have failed."); in test_range_unsupported()
|
/libcore/ojluni/src/main/java/sun/util/locale/provider/ |
D | CalendarDataUtility.java | 141 public static String retrieveFieldValueName(String id, int field, int value, int style, in retrieveFieldValueName() argument 143 if (field == Calendar.ERA) { in retrieveFieldValueName() 165 String[] names = getNames(id, field, style, locale); in retrieveFieldValueName() 188 public static String retrieveJavaTimeFieldValueName(String id, int field, int value, int style, in retrieveJavaTimeFieldValueName() argument 191 return retrieveFieldValueName(id, field, value, style, locale); in retrieveJavaTimeFieldValueName() 204 public static Map<String, Integer> retrieveFieldValueNames(String id, int field, int style, in retrieveFieldValueNames() argument 208 names = retrieveFieldValueNamesImpl(id, field, SHORT_FORMAT, locale); in retrieveFieldValueNames() 210 names.putAll(retrieveFieldValueNamesImpl(id, field, st, locale)); in retrieveFieldValueNames() 214 names = retrieveFieldValueNamesImpl(id, field, style, locale); in retrieveFieldValueNames() 235 public static Map<String, Integer> retrieveJavaTimeFieldValueNames(String id, int field, in retrieveJavaTimeFieldValueNames() argument [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
D | TCKJulianFields.java | 128 public void test_samples_get(TemporalField field, LocalDate date, long expected) { in test_samples_get() argument 129 assertEquals(date.getLong(field), expected); in test_samples_get() 133 public void test_samples_set(TemporalField field, LocalDate date, long value) { in test_samples_set() argument 134 assertEquals(field.adjustInto(LocalDate.MAX, value), date); in test_samples_set() 135 assertEquals(field.adjustInto(LocalDate.MIN, value), date); in test_samples_set() 136 assertEquals(field.adjustInto(JAN01_1970, value), date); in test_samples_set() 137 assertEquals(field.adjustInto(DEC31_1969, value), date); in test_samples_set() 138 assertEquals(field.adjustInto(NOV12_1945, value), date); in test_samples_set() 143 public void test_samples_parse_STRICT(TemporalField field, LocalDate date, long value) { in test_samples_parse_STRICT() argument 144 DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field) in test_samples_parse_STRICT() [all …]
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | DateTimePrintContext.java | 187 public boolean isSupported(TemporalField field) { in adjust() 188 if (effectiveDate != null && field.isDateBased()) { in adjust() 189 return effectiveDate.isSupported(field); in adjust() 191 return temporal.isSupported(field); in adjust() 194 public ValueRange range(TemporalField field) { in adjust() argument 195 if (effectiveDate != null && field.isDateBased()) { in adjust() 196 return effectiveDate.range(field); in adjust() 198 return temporal.range(field); in adjust() 201 public long getLong(TemporalField field) { in adjust() argument 202 if (effectiveDate != null && field.isDateBased()) { in adjust() [all …]
|
/libcore/ojluni/annotations/hiddenapi/java/util/ |
D | Calendar.java | 109 public int get(int field) { in get() argument 113 protected final int internalGet(int field) { in internalGet() argument 117 final void internalSet(int field, int value) { in internalSet() argument 121 public void set(int field, int value) { in set() argument 141 public final void clear(int field) { in clear() argument 145 public final boolean isSet(int field) { in isSet() argument 149 public java.lang.String getDisplayName(int field, int style, java.util.Locale locale) { in getDisplayName() argument 154 int field, int style, java.util.Locale locale) { in getDisplayNames() argument 159 int field, int style, java.util.Locale locale) { in getDisplayNamesImpl() argument 164 int field, in checkDisplayNameParams() argument [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | DataFormatFieldTest.java | 37 MyField field = new MyField("day of month", Calendar.ERA); in test_ConstructorLjava_lang_StringLjava_lang_String() local 39 assertEquals("field has wrong name", "day of month", field.getName()); in test_ConstructorLjava_lang_StringLjava_lang_String() 41 field.getCalendarField()); in test_ConstructorLjava_lang_StringLjava_lang_String() 70 MyField field = new MyField("a field", Calendar.DAY_OF_WEEK); in test_ConstructorLjava_lang_StringI() local 72 assertEquals("field has wrong name", "a field", field.getName()); in test_ConstructorLjava_lang_StringI() 74 Calendar.DAY_OF_WEEK, field.getCalendarField()); in test_ConstructorLjava_lang_StringI() 86 MyField field = new MyField("day of month", Calendar.ERA); in test_Constructor2() local 88 assertEquals("field has wrong name", "day of month", field.getName()); in test_Constructor2() 90 field.getCalendarField()); in test_Constructor2() 182 MyField field; in test_readResolve() local [all …]
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | OldNumberFormatFieldTest.java | 32 MyNumberFormat field = new MyNumberFormat(name); in test_ConstructorLjava_lang_String() local 33 assertEquals("field has wrong name", name, field.getName()); in test_ConstructorLjava_lang_String() 35 field = new MyNumberFormat(null); in test_ConstructorLjava_lang_String() 36 assertEquals("field has wrong name", null, field.getName()); in test_ConstructorLjava_lang_String() 48 MyNumberFormat field; in test_readResolve() local 52 field = new MyNumberFormat(null); in test_readResolve() 55 out.writeObject(field); in test_readResolve()
|