Udostępnij za pośrednictwem


LocalTime Class

Definition

A time without a time-zone in the ISO-8601 calendar system, such as 10:15:30.

[Android.Runtime.Register("java/time/LocalTime", ApiSince=26, DoNotGenerateAcw=true)]
public sealed class LocalTime : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.IO.ISerializable, Java.Lang.IComparable, Java.Time.Temporal.ITemporal, Java.Time.Temporal.ITemporalAdjuster
[<Android.Runtime.Register("java/time/LocalTime", ApiSince=26, DoNotGenerateAcw=true)>]
type LocalTime = class
    inherit Object
    interface ISerializable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
    interface IComparable
    interface ITemporal
    interface ITemporalAccessor
    interface ITemporalAdjuster
Inheritance
LocalTime
Attributes
Implements

Remarks

A time without a time-zone in the ISO-8601 calendar system, such as 10:15:30.

LocalTime is an immutable date-time object that represents a time, often viewed as hour-minute-second. Time is represented to nanosecond precision. For example, the value "13:45.30.123456789" can be stored in a LocalTime.

This class does not store or represent a date or time-zone. Instead, it is a description of the local time as seen on a wall clock. It cannot represent an instant on the time-line without additional information such as an offset or time-zone.

The ISO-8601 calendar system is the modern civil calendar system used today in most of the world. This API assumes that all calendar systems use the same representation, this class, for time-of-day.

Added in 1.8.

Java documentation for java.time.LocalTime.

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

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
Hour

Gets the hour-of-day field.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Max
Midnight
Min
Minute

Gets the minute-of-hour field.

Nano

Gets the nano-of-second field.

Noon
PeerReference (Inherited from Object)
Second

Gets the second-of-minute field.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

AdjustInto(ITemporal)
AtDate(LocalDate)
AtOffset(ZoneOffset)
Clone()

Creates and returns a copy of this object.

(Inherited from Object)
CompareTo(LocalTime)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
Format(DateTimeFormatter)
From(ITemporalAccessor)
Get(ITemporalField)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetLong(ITemporalField)
IsAfter(LocalTime)
IsBefore(LocalTime)
IsSupported(ITemporalField)
IsSupported(ITemporalUnit)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Minus(Int64, ITemporalUnit)
Minus(ITemporalAmount)
MinusHours(Int64)
MinusMinutes(Int64)
MinusNanos(Int64)
MinusSeconds(Int64)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
Now()
Now(Clock)
Now(ZoneId)
Of(Int32, Int32, Int32, Int32)
Of(Int32, Int32, Int32)
Of(Int32, Int32)
OfInstant(Instant, ZoneId)
OfNanoOfDay(Int64)
OfSecondOfDay(Int64)
Parse(ICharSequence, DateTimeFormatter)
Parse(ICharSequence)
Parse(String, DateTimeFormatter)
Parse(String)
Plus(Int64, ITemporalUnit)
Plus(ITemporalAmount)
PlusHours(Int64)
PlusMinutes(Int64)
PlusNanos(Int64)
PlusSeconds(Int64)
Query(ITemporalQuery)
Range(ITemporalField)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToEpochSecond(LocalDate, ZoneOffset)
ToNanoOfDay()

Extracts the time as nanos of day, from 0 to 24 * 60 * 60 * 1,000,000,000 - 1.

ToSecondOfDay()

Extracts the time as seconds of day, from 0 to 24 * 60 * 60 - 1.

ToString()

Returns a string representation of the object.

(Inherited from Object)
TruncatedTo(ITemporalUnit)
UnregisterFromRuntime() (Inherited from Object)
Until(ITemporal, ITemporalUnit)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
With(ITemporalAdjuster)
With(ITemporalField, Int64)
WithHour(Int32)
WithMinute(Int32)
WithNano(Int32)
WithSecond(Int32)

Explicit Interface Implementations

IComparable.CompareTo(Object)
IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to