/libcore/ojluni/src/main/java/java/time/temporal/ |
package-info.java | 82 * All units implement {@link java.time.temporal.TemporalUnit}. 83 * The set of well known units is defined in {@link java.time.temporal.ChronoUnit}, such as {@code DAYS}. 88 * All fields implement {@link java.time.temporal.TemporalField}. 89 * The set of well known fields are defined in {@link java.time.temporal.ChronoField}, such as {@code HOUR_OF_DAY}. 90 * Additional fields are defined by {@link java.time.temporal.JulianFields}, {@link java.time.temporal.WeekFields} 91 * and {@link java.time.temporal.IsoFields}. 97 * {@link java.time.temporal.Temporal} provides the abstraction for date time types that support fields. 114 * The functions implement {@link java.time.temporal.TemporalAdjuster} and operate on {@code Temporal} [all...] |
TemporalAdjuster.java | 62 package java.time.temporal; 67 * Strategy for adjusting a temporal object. 69 * Adjusters are a key tool for modifying temporal objects. 77 * The second is to use {@link Temporal#with(TemporalAdjuster)}: 80 * temporal = thisAdjuster.adjustInto(temporal); 81 * temporal = temporal.with(thisAdjuster); 109 * Adjusts the specified temporal object. 111 * This adjusts the specified temporal object using the logi [all...] |
TemporalQuery.java | 62 package java.time.temporal; 67 * Strategy for querying a temporal object. 69 * Queries are a key tool for extracting information from temporal objects. 76 * temporal objects. That interface is limited to returning a {@code long}. 84 * temporal = thisQuery.queryFrom(temporal); 85 * temporal = temporal.query(thisQuery); 106 * Queries the specified temporal object. 108 * This queries the specified temporal object to return an object using the logi [all...] |
UnsupportedTemporalTypeException.java | 62 package java.time.temporal; 68 * not supported for a Temporal class.
|
Temporal.java | 62 package java.time.temporal; 67 * Framework-level interface defining read-write access to a temporal object, 129 public interface Temporal extends TemporalAccessor { 143 * is obtained by invoking {@code TemporalUnit.isSupportedBy(Temporal)} 161 * {@link java.time.temporal.TemporalAdjusters TemporalAdjusters}. 175 * Implementations must not alter either this object or the specified temporal object. 189 default Temporal with(TemporalAdjuster adjuster) { 211 * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)} 225 Temporal with(TemporalField field, long newValue); 231 * This adjusts this temporal, adding according to the rules of the specified amount [all...] |
TemporalAmount.java | 62 package java.time.temporal; 137 * Adds to the specified temporal object. 139 * Adds the amount to the specified temporal object using the logic 144 * The second is to use {@link Temporal#plus(TemporalAmount)}: 156 * documenting that logic. It may use any method on {@code Temporal} to 157 * query the temporal object and perform the addition. 162 * This provides equivalent, safe behavior for immutable and mutable temporal objects. 164 * The input temporal object may be in a calendar system other than ISO. 166 * or reject non-ISO temporal objects by {@link TemporalQueries#chronology() querying the chronology}. 171 * @param temporal the temporal object to add the amount to, not nul [all...] |
TemporalAccessor.java | 62 package java.time.temporal; 68 * Framework-level interface defining read-only access to a temporal object, 87 * A sub-interface, {@link Temporal}, extends this definition to one that also 88 * supports adjustment and manipulation on more complete temporal objects. 133 * The value of this temporal object is used to enhance the accuracy of the returned range.
|
TemporalUnit.java | 62 package java.time.temporal; 157 * Checks if this unit is supported by the specified temporal object. 163 * {@link Temporal#plus(long, TemporalUnit)}. 165 * @param temporal the temporal object to check, not null 168 default boolean isSupportedBy(Temporal temporal) { 169 if (temporal instanceof LocalTime) { 172 if (temporal instanceof ChronoLocalDate) { 175 if (temporal instanceof ChronoLocalDateTime || temporal instanceof ChronoZonedDateTime) [all...] |
TemporalAdjusters.java | 62 package java.time.temporal; 64 import static java.time.temporal.ChronoField.DAY_OF_MONTH; 65 import static java.time.temporal.ChronoField.DAY_OF_WEEK; 66 import static java.time.temporal.ChronoField.DAY_OF_YEAR; 67 import static java.time.temporal.ChronoUnit.DAYS; 68 import static java.time.temporal.ChronoUnit.MONTHS; 69 import static java.time.temporal.ChronoUnit.YEARS; 79 * Adjusters are a key tool for modifying temporal objects. 87 * The second is to use {@link Temporal#with(TemporalAdjuster)}: 90 * temporal = thisAdjuster.adjustInto(temporal) [all...] |
TemporalField.java | 62 package java.time.temporal; 179 * Checks if this field is supported by the temporal object. 181 * This determines whether the temporal accessor supports this field. 182 * If this returns false, then the temporal cannot be queried for this field. 189 * temporal = thisField.isSupportedBy(temporal); 190 * temporal = temporal.isSupported(thisField); 198 * @param temporal the temporal object to query, not nul [all...] |
TemporalQueries.java | 62 package java.time.temporal; 64 import static java.time.temporal.ChronoField.EPOCH_DAY; 65 import static java.time.temporal.ChronoField.NANO_OF_DAY; 66 import static java.time.temporal.ChronoField.OFFSET_SECONDS; 82 * Queries are a key tool for extracting information from temporal objects. 89 * temporal objects. That interface is limited to returning a {@code long}. 97 * temporal = thisQuery.queryFrom(temporal); 98 * temporal = temporal.query(thisQuery) [all...] |
JulianFields.java | 62 package java.time.temporal; 64 import static java.time.temporal.ChronoField.EPOCH_DAY; 65 import static java.time.temporal.ChronoUnit.DAYS; 66 import static java.time.temporal.ChronoUnit.FOREVER; 109 * 'JULIAN_DAY.adjustInto()' and 'JULIAN_DAY.getFrom()' only apply to {@code Temporal} objects that 155 * 'MODIFIED_JULIAN_DAY.adjustInto()' and 'MODIFIED_JULIAN_DAY.getFrom()' only apply to {@code Temporal} objects 193 * 'RATA_DIE.adjustInto()' and 'RATA_DIE.getFrom()' only apply to {@code Temporal} objects 263 public boolean isSupportedBy(TemporalAccessor temporal) { 264 return temporal.isSupported(EPOCH_DAY); 268 public ValueRange rangeRefinedBy(TemporalAccessor temporal) { [all...] |
/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
TestDateTimeBuilderCombinations.java | 60 package test.java.time.temporal; 62 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH; 63 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR; 64 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH; 65 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR; 66 import static java.time.temporal.ChronoField.DAY_OF_MONTH; 67 import static java.time.temporal.ChronoField.DAY_OF_WEEK; 68 import static java.time.temporal.ChronoField.DAY_OF_YEAR; 69 import static java.time.temporal.ChronoField.EPOCH_DAY; 70 import static java.time.temporal.ChronoField.MONTH_OF_YEAR 203 TemporalAccessor temporal = f.parse(str); local [all...] |
MockFieldValue.java | 60 package test.java.time.temporal; 62 import java.time.temporal.ChronoField; 63 import java.time.temporal.TemporalAccessor; 64 import java.time.temporal.TemporalField; 65 import java.time.temporal.UnsupportedTemporalTypeException; 66 import java.time.temporal.ValueRange;
|
MockFieldNoValue.java | 60 package test.java.time.temporal; 62 import static java.time.temporal.ChronoUnit.MONTHS; 63 import static java.time.temporal.ChronoUnit.WEEKS; 66 import java.time.temporal.Temporal; 67 import java.time.temporal.TemporalAccessor; 68 import java.time.temporal.TemporalField; 69 import java.time.temporal.TemporalUnit; 70 import java.time.temporal.ValueRange; 106 public boolean isSupportedBy(TemporalAccessor temporal) { [all...] |
TestJulianFields.java | 60 package test.java.time.temporal; 64 import java.time.temporal.JulianFields;
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/ |
TCKChronoFieldSerialization.java | 57 package tck.java.time.temporal.serial; 59 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH; 60 import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR; 61 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH; 62 import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR; 63 import static java.time.temporal.ChronoField.AMPM_OF_DAY; 64 import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_AMPM; 65 import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY; 66 import static java.time.temporal.ChronoField.DAY_OF_MONTH; 67 import static java.time.temporal.ChronoField.DAY_OF_WEEK [all...] |
TCKChronoUnitSerialization.java | 57 package tck.java.time.temporal.serial; 59 import static java.time.temporal.ChronoUnit.CENTURIES; 60 import static java.time.temporal.ChronoUnit.DAYS; 61 import static java.time.temporal.ChronoUnit.DECADES; 62 import static java.time.temporal.ChronoUnit.ERAS; 63 import static java.time.temporal.ChronoUnit.FOREVER; 64 import static java.time.temporal.ChronoUnit.HALF_DAYS; 65 import static java.time.temporal.ChronoUnit.HOURS; 66 import static java.time.temporal.ChronoUnit.MICROS; 67 import static java.time.temporal.ChronoUnit.MILLENNIA [all...] |
TCKJulianFieldsSerialization.java | 60 package tck.java.time.temporal.serial; 63 import java.time.temporal.JulianFields; 64 import java.time.temporal.TemporalField;
|
TCKValueRangeSerialization.java | 60 package tck.java.time.temporal.serial; 71 import java.time.temporal.ValueRange;
|
TCKWeekFieldsSerialization.java | 57 package tck.java.time.temporal.serial; 72 import java.time.temporal.WeekFields;
|
/libcore/luni/src/test/java/libcore/java/time/temporal/ |
UnsupportedTemporalTypeExceptionTest.java | 16 package libcore.java.time.temporal; 19 import java.time.temporal.UnsupportedTemporalTypeException;
|
/libcore/luni/src/test/java/libcore/java/time/ |
DurationTest.java | 29 import java.time.temporal.Temporal; 30 import java.time.temporal.UnsupportedTemporalTypeException; 88 Temporal temporal = (Temporal) values[0]; local 92 duration.addTo(temporal); 93 fail(" Should have failed to add " + duration + " to " + temporal); 116 Temporal temporal = (Temporal) values[0] local [all...] |
/libcore/ojluni/src/main/java/java/time/format/ |
DateTimePrintContext.java | 64 import static java.time.temporal.ChronoField.EPOCH_DAY; 65 import static java.time.temporal.ChronoField.INSTANT_SECONDS; 66 import static java.time.temporal.ChronoField.OFFSET_SECONDS; 75 import java.time.temporal.ChronoField; 76 import java.time.temporal.TemporalAccessor; 77 import java.time.temporal.TemporalField; 78 import java.time.temporal.TemporalQueries; 79 import java.time.temporal.TemporalQuery; 80 import java.time.temporal.ValueRange; 99 * The temporal being output 101 private TemporalAccessor temporal; field in class:DateTimePrintContext [all...] |
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
TestDateTimeFormatter.java | 62 import static java.time.temporal.ChronoField.DAY_OF_MONTH; 87 import java.time.temporal.TemporalAccessor; 146 TemporalAccessor temporal = f.parse("2010-06-30"); local 148 function.apply(temporal); 161 TemporalAccessor temporal = f.parse("11:30:56"); local 163 function.apply(temporal); 177 TemporalAccessor temporal = f.parse("11:30:56"); local 178 String msg = temporal.toString(); 185 TemporalAccessor temporal = f.parse("2010-06-30"); local 186 String msg = temporal.toString() 193 TemporalAccessor temporal = f.parse("2010-06-30 11:30:56"); local [all...] |