다음을 통해 공유


IChronoPeriod Interface

Definition

A date-based amount of time, such as '3 years, 4 months and 5 days' in an arbitrary chronology, intended for advanced globalization use cases.

[Android.Runtime.Register("java/time/chrono/ChronoPeriod", "", "Java.Time.Chrono.IChronoPeriodInvoker", ApiSince=26)]
public interface IChronoPeriod : IDisposable, Java.Interop.IJavaPeerable, Java.Time.Temporal.ITemporalAmount
[<Android.Runtime.Register("java/time/chrono/ChronoPeriod", "", "Java.Time.Chrono.IChronoPeriodInvoker", ApiSince=26)>]
type IChronoPeriod = interface
    interface ITemporalAmount
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

A date-based amount of time, such as '3 years, 4 months and 5 days' in an arbitrary chronology, intended for advanced globalization use cases.

This interface models a date-based amount of time in a calendar system. While most calendar systems use years, months and days, some do not. Therefore, this interface operates solely in terms of a set of supported units that are defined by the Chronology. The set of supported units is fixed for a given chronology. The amount of a supported unit may be set to zero.

The period is modeled as a directed amount of time, meaning that individual parts of the period may be negative.

Added in 1.8.

Java documentation for java.time.chrono.ChronoPeriod.

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

Chronology
Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
IsNegative

Checks if any of the supported units of this period are negative.

IsZero

Checks if all the supported units of this period are zero.

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)
Units

Methods

AddTo(ITemporal)

Adds this period to the specified temporal object.

Between(IChronoLocalDate, IChronoLocalDate)

Obtains a ChronoPeriod consisting of amount of time between two dates.

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)
Equals(Object)

Checks if this period is equal to another period, including the chronology.

Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
Get(ITemporalUnit)

Gets the value of the requested unit.

GetHashCode()

A hash code for this period.

Minus(ITemporalAmount)

Returns a copy of this period with the specified period subtracted.

MultipliedBy(Int32)

Returns a new instance with each amount in this period in this period multiplied by the specified scalar.

Negated()

Returns a new instance with each amount in this period negated.

Normalized()

Returns a copy of this period with the amounts of each unit normalized.

Plus(ITemporalAmount)

Returns a copy of this period with the specified period added.

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)
SubtractFrom(ITemporal)

Subtracts this period from the specified temporal object.

ToString()

Outputs this period as a String.

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