Share via


ITemporalAccessor Interface

Definition

Framework-level interface defining read-only access to a temporal object, such as a date, time, offset or some combination of these.

[Android.Runtime.Register("java/time/temporal/TemporalAccessor", "", "Java.Time.Temporal.ITemporalAccessorInvoker", ApiSince=26)]
public interface ITemporalAccessor : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("java/time/temporal/TemporalAccessor", "", "Java.Time.Temporal.ITemporalAccessorInvoker", ApiSince=26)>]
type ITemporalAccessor = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

Framework-level interface defining read-only access to a temporal object, such as a date, time, offset or some combination of these.

This is the base interface type for date, time and offset objects. It is implemented by those classes that can provide information as TemporalField fields or TemporalQuery queries.

Most date and time information can be represented as a number. These are modeled using TemporalField with the number held using a long to handle large values. Year, month and day-of-month are simple examples of fields, but they also include instant and offsets. See ChronoField for the standard set of fields.

Two pieces of date/time information cannot be represented by numbers, the java.time.chrono.Chronology chronology and the java.time.ZoneId time-zone. These can be accessed via #query(TemporalQuery) queries using the static methods defined on TemporalQuery.

A sub-interface, Temporal, extends this definition to one that also supports adjustment and manipulation on more complete temporal objects.

This interface is a framework-level interface that should not be widely used in application code. Instead, applications should create and pass around instances of concrete types, such as LocalDate. There are many reasons for this, part of which is that implementations of this interface may be in calendar systems other than ISO. See java.time.chrono.ChronoLocalDate for a fuller discussion of the issues.

Added in 1.8.

Java documentation for java.time.temporal.TemporalAccessor.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)

Methods

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
Get(ITemporalField)

Gets the value of the specified field as an int.

GetLong(ITemporalField)

Gets the value of the specified field as a long.

IsSupported(ITemporalField)

Checks if the specified field is supported.

Query(ITemporalQuery)

Queries this date-time.

Range(ITemporalField)

Gets the range of valid values for the specified field.

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to