java.time.temporal.TemporalAccessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jtransc-rt Show documentation
Show all versions of jtransc-rt Show documentation
JVM AOT compiler currently generating JavaScript, C++, Haxe, with initial focus on Kotlin and games.
package java.time.temporal;
public interface TemporalAccessor {
boolean isSupported(TemporalField field);
long getLong(TemporalField field);
default ValueRange range(TemporalField field) {
if (field instanceof ChronoField) {
return field.range();
} else {
return field.rangeRefinedBy(this);
}
}
default int get(TemporalField field) {
ValueRange range = range(field);
long value = getLong(field);
return (int) value;
}
default R query(TemporalQuery query) {
return query.queryFrom(this);
}
}