Searched defs:field (Results 26 - 50 of 97) sorted by relevance

1234

/libcore/ojluni/src/test/java/time/test/java/time/format/
H A DTestTextPrinter.java247 public void test_format(TemporalField field, TextStyle style, int value, String expected) throws Exception { argument
248 getFormatter(field, style).formatTo(new MockFieldValue(field, value), buf);
260 public void test_formatJapaneseEra(TemporalField field, TextStyle style, int value, String expected) throws Exception { argument
262 getFormatter(field, style).withChronology(JapaneseChronology.INSTANCE).formatTo(ld, buf);
267 public void test_standaloneNames(Locale locale, TemporalField field, TextStyle style, String expected) { argument
268 getFormatter(field, style).withLocale(locale).formatTo(LocalDate.of(2013, 1, 1), buf);
H A DTestFractionPrinterParser.java84 private DateTimeFormatter getFormatter(TemporalField field, int minWidth, int maxWidth, boolean decimalPoint) { argument
85 return builder.appendFraction(field, minWidth, maxWidth, decimalPoint).toFormatter(locale).withDecimalStyle(decimalStyle);
303 private void assertParsed(TemporalAccessor parsed, TemporalField field, Long value) { argument
305 assertEquals(parsed.isSupported(field), false);
307 assertEquals(parsed.isSupported(field), true);
308 assertEquals(parsed.getLong(field), (long) value);
327 public void test_parse_nothing(TemporalField field, int min, int max, boolean decimalPoint, String text, int pos, int expected) { argument
329 TemporalAccessor parsed = getFormatter(field, min, max, decimalPoint).parseUnresolved(text, ppos);
H A DTestNumberParser.java96 public void test_parse_error(TemporalField field, int min, int max, SignStyle style, String text, int pos, Class<?> expected) { argument
98 getFormatter(field, min, max, style).parseUnresolved(text, new ParsePosition(pos));
148 {1, 19, SignStyle.NEVER, 1, "1", 0, 1, 1L}, // error from next field
149 {2, 2, SignStyle.NEVER, 1, "12", 0, 2, 12L}, // error from next field
157 {1, 19, SignStyle.NEVER, 2, "1", 0, 1, 1L}, // error from next field
158 {1, 19, SignStyle.NEVER, 2, "12", 0, 1, 1L}, // error from next field
159 {2, 2, SignStyle.NEVER, 2, "12", 0, 2, 12L}, // error from next field
H A DTestReducedPrinter.java83 private DateTimeFormatter getFormatter0(TemporalField field, int width, int baseValue) { argument
84 return builder.appendValueReduced(field, width, width, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle);
87 private DateTimeFormatter getFormatter0(TemporalField field, int minWidth, int maxWidth, int baseValue) { argument
88 return builder.appendValueReduced(field, minWidth, maxWidth, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle);
91 private DateTimeFormatter getFormatterBaseDate(TemporalField field, int minWidth, int maxWidth, int baseValue) { argument
92 return builder.appendValueReduced(field, minWidth, maxWidth, LocalDate.of(baseValue, 1, 1)).toFormatter(locale).withDecimalStyle(decimalStyle);
/libcore/support/src/test/java/tests/support/
H A DSupport_Format.java37 String text, Format.Field field, int begin, int end) {
39 FieldPosition pos = new FieldPosition(field);
53 assertEquals("Test " + count + ": incorrect begin index for field "
54 + field, begin, pos.getBeginIndex());
55 assertEquals("Test " + count + ": incorrect end index for field"
56 + field, end, pos.getEndIndex());
36 t_FormatWithField(int count, Format format, Object object, String text, Format.Field field, int begin, int end) argument
/libcore/luni/src/main/java/javax/xml/datatype/
H A DDuration.java35 * minutes, and seconds) plus a sign (+/-) field.</p>
38 * (which represents that the field is not set),
39 * and the seconds field has a non-negative decimal or null.
98 * i.e. {@link #isSet(DatatypeConstants.Field field)} == <code>true</code>.</p>
221 * {@link #getField(DatatypeConstants.Field field) getField(DatatypeConstants.YEARS)}.</p>
225 * Use {@link #getField(DatatypeConstants.Field field) getField(DatatypeConstants.YEARS)} to avoid possible loss of precision.</p>
227 * @return If the years field is present, return its value as an <code>int</code>, else return <code>0</code>.
234 * Obtains the value of the MONTHS field as an integer value,
238 * that this method works on the MONTHS field.
247 * Obtains the value of the DAYS field a
400 getField(final DatatypeConstants.Field field) argument
412 getFieldValueAsInt(final DatatypeConstants.Field field) argument
435 isSet(final DatatypeConstants.Field field) argument
[all...]
/libcore/luni/src/test/java/libcore/java/time/chrono/
H A DChronologyTest.java135 public ValueRange range(ChronoField field) { argument
/libcore/luni/src/test/java/tests/java/sql/
H A DMultiThreadAccessTest.java203 String field = "field3";
212 // assertEquals("Wrong value of field " + field, BigDecimal.valueOf(id),
213 // result.getBigDecimal(field));
217 threadPool.runTask(createTask7(id, field));
226 // assertEquals("Wrong value of field " + field, expectedVal, result
227 // .getBigDecimal(field).doubleValue());
414 * field of one record with identifier id in the first table
418 private static Runnable createTask7(final int id, final String field) { argument
[all...]
/libcore/ojluni/src/main/java/java/text/
H A DFieldPosition.java54 * field within the formatted output with two indices: the index
55 * of the first character of the field and the index of the last
56 * character of the field.
63 * formatted output (such as the position of a field).
76 * Input: Desired field to determine start and end offsets for.
79 int field = 0; field in class:FieldPosition
82 * Output: End offset of field in text.
83 * If the field does not occur in the text, 0 is returned.
88 * Output: Start offset of field in text.
89 * If the field doe
109 FieldPosition(int field) argument
275 matchesField(Format.Field attribute, int field) argument
[all...]
/libcore/ojluni/src/main/java/java/time/
H A DDayOfWeek.java178 * The conversion extracts the {@link ChronoField#DAY_OF_WEEK DAY_OF_WEEK} field.
232 * Checks if the specified field is supported.
234 * This checks if this day-of-week can be queried for the specified field.
238 * If the field is {@link ChronoField#DAY_OF_WEEK DAY_OF_WEEK} then
242 * If the field is not a {@code ChronoField}, then the result of this method
245 * Whether the field is supported is determined by the field.
247 * @param field the field to check, null returns false
248 * @return true if the field i
251 isSupported(TemporalField field) argument
281 range(TemporalField field) argument
314 get(TemporalField field) argument
344 getLong(TemporalField field) argument
[all...]
H A DMonth.java200 * The conversion extracts the {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} field.
259 * Checks if the specified field is supported.
261 * This checks if this month-of-year can be queried for the specified field.
265 * If the field is {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} then
269 * If the field is not a {@code ChronoField}, then the result of this method
272 * Whether the field is supported is determined by the field.
274 * @param field the field to check, null returns false
275 * @return true if the field i
278 isSupported(TemporalField field) argument
308 range(TemporalField field) argument
341 get(TemporalField field) argument
371 getLong(TemporalField field) argument
[all...]
H A DMonthDay.java94 * of a month and day-of-month. Any field that can be derived from a month and day,
208 * @throws DateTimeException if the value of any field is out of range,
215 throw new DateTimeException("Illegal value for DayOfMonth field, value " + dayOfMonth +
234 * @throws DateTimeException if the value of any field is out of range,
320 * Checks if the specified field is supported.
322 * This checks if this month-day can be queried for the specified field.
326 * If the field is a {@link ChronoField} then the query is implemented here.
334 * If the field is not a {@code ChronoField}, then the result of this method
337 * Whether the field is supported is determined by the field
343 isSupported(TemporalField field) argument
374 range(TemporalField field) argument
410 get(TemporalField field) argument
438 getLong(TemporalField field) argument
[all...]
H A DZoneOffset.java328 * on extracting the {@link ChronoField#OFFSET_SECONDS OFFSET_SECONDS} field.
504 * Checks if the specified field is supported.
506 * This checks if this offset can be queried for the specified field.
510 * If the field is a {@link ChronoField} then the query is implemented here.
511 * The {@code OFFSET_SECONDS} field returns true.
514 * If the field is not a {@code ChronoField}, then the result of this method
517 * Whether the field is supported is determined by the field.
519 * @param field the field t
523 isSupported(TemporalField field) argument
554 range(TemporalField field) argument
584 get(TemporalField field) argument
616 getLong(TemporalField field) argument
[all...]
/libcore/ojluni/src/main/java/java/time/chrono/
H A DChronoLocalDateTime.java210 * Checks if the specified field is supported.
212 * This checks if the specified field can be queried on this date-time.
220 * If the field is not a {@code ChronoField}, then the result of this method
223 * Whether the field is supported is determined by the field.
225 * @param field the field to check, null returns false
226 * @return true if the field can be queried, false if not
229 boolean isSupported(TemporalField field); argument
275 ChronoLocalDateTime<D> with(TemporalField field, lon argument
[all...]
H A DJapaneseEra.java306 * Gets the range of valid values for the specified field.
308 * The range object expresses the minimum and maximum valid values for a field.
310 * If it is not possible to return the range, because the field is not supported
313 * If the field is a {@link ChronoField} then the query is implemented here.
314 * The {@code ERA} field returns the range.
317 * If the field is not a {@code ChronoField}, then the result of this method
320 * Whether the range can be obtained is determined by the field.
325 * @param field the field to query the range for, not null
326 * @return the range of valid values for the field, no
331 range(TemporalField field) argument
[all...]
H A DMinguoChronology.java314 public ValueRange range(ChronoField field) { argument
315 switch (field) {
329 return field.range();
H A DAbstractChronology.java364 * resolve method on the field. By contrast, the {@code ChronoField} class
376 * then the field is validated.
533 // reinstate the field removed earlier, no cross-check issues
662 * Adds a field-value pair to the map, checking for conflicts.
664 * If the field is not already present, then the field-value pair is added to the map.
665 * If the field is already present and it has the same value as that specified, no action occurs.
666 * If the field is already present and it has a different value to that specified, then
669 * @param field the field t
673 addFieldValue(Map<TemporalField, Long> fieldValues, ChronoField field, long value) argument
[all...]
H A DChronoLocalDate.java137 * era, year-of-era, month-of-year and day-of-month. The extra era field is frequently
364 * Checks if the specified field is supported.
366 * This checks if the specified field can be queried on this date.
374 * If the field is not a {@code ChronoField}, then the result of this method
377 * Whether the field is supported is determined by the field.
379 * @param field the field to check, null returns false
380 * @return true if the field can be queried, false if not
383 default boolean isSupported(TemporalField field) { argument
435 with(TemporalField field, long newValue) argument
[all...]
/libcore/ojluni/src/main/java/java/time/temporal/
H A DValueRange.java71 * The range of valid values for a date-time field.
80 * For example, a weird field may have valid values of 1, 2, 4, 6, 7, thus
83 * Instances of this class are not tied to a specific field.
209 * Gets the minimum value that the field can take.
214 * @return the minimum value for this field
221 * Gets the largest possible minimum value that the field can take.
226 * @return the largest possible minimum value for this field
233 * Gets the smallest possible maximum value that the field can take.
238 * @return the smallest possible maximum value for this field
245 * Gets the maximum value that the field ca
309 checkValidValue(long value, TemporalField field) argument
328 checkValidIntValue(long value, TemporalField field) argument
335 genInvalidFieldMessage(TemporalField field, long value) argument
[all...]
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
H A DCopticChronology.java231 public ValueRange range(ChronoField field) { argument
232 switch (field) {
240 return field.range();
H A DCopticDate.java191 public ValueRange range(TemporalField field) { argument
192 if (field instanceof ChronoField) {
193 if (isSupported(field)) {
194 ChronoField f = (ChronoField) field;
205 throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
207 return field.rangeRefinedBy(this);
211 public long getLong(TemporalField field) { argument
212 if (field instanceof ChronoField) {
213 switch ((ChronoField) field) {
233 with(TemporalField field, long newValue) argument
[all...]
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
H A DTestJapaneseChronology.java83 // field, minSmallest, minLargest, maxSmallest, maxLargest
163 public void test_range(ChronoField field, int minSmallest, int minLargest, int maxSmallest, int maxLargest) { argument
164 ValueRange range = JAPANESE.range(field);
/libcore/benchmarks/src/benchmarks/regression/
H A DAnnotatedElementBenchmark.java28 private Field field; field in class:AnnotatedElementBenchmark
34 field = Type.class.getField("field");
49 field.getAnnotations();
73 field.getAnnotation(Marker.class);
91 field.isAnnotationPresent(Marker.class);
214 @Marker public String field; field in class:AnnotatedElementBenchmark.Type
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DCalendarTest.java40 // Test for correct result defined by the last set field
361 // Ensure last date field set is reset after computing
742 public int internal_get(int field) { argument
743 return super.internalGet(field);
754 public void add(int field, int value) { argument
766 public int getGreatestMinimum(int field) { argument
771 public int getLeastMaximum(int field) { argument
776 public int getMaximum(int field) { argument
781 public int getMinimum(int field) { argument
786 public void roll(int field, boolea argument
[all...]
/libcore/luni/src/test/java/libcore/java/lang/reflect/
H A DClassLoaderReflectionTest.java71 assertEquals(aClass, aListClass.getDeclaredField("field").getType());
144 Field f1 = B.class.getDeclaredField("field");
145 Field f2 = bClass.getDeclaredField("field");
151 T field; field in class:ClassLoaderReflectionTest.B
169 A field; field in class:ClassLoaderReflectionTest.AList

Completed in 411 milliseconds

1234