public final class TimeInterval


A time interval, typically used to describe the validity period of a TimelineEntry.

Summary

Public constructors

Public methods

boolean
equals(Object other)
final @NonNull Instant

The Instant when this TimeInterval becomes invalid, must be after start

final @NonNull Instant

The Instant when this TimeInterval becomes valid

int
final void
final void
@NonNull String

Public constructors

TimeInterval

Added in 1.1.0
public TimeInterval(@NonNull Instant start, @NonNull Instant end)
Parameters
@NonNull Instant start

The Instant when this TimeInterval becomes valid

@NonNull Instant end

The Instant when this TimeInterval becomes invalid, must be after start

Public methods

equals

public boolean equals(Object other)

getEnd

Added in 1.1.0
public final @NonNull Instant getEnd()

The Instant when this TimeInterval becomes invalid, must be after start

getStart

Added in 1.1.0
public final @NonNull Instant getStart()

The Instant when this TimeInterval becomes valid

hashCode

public int hashCode()

setEnd

Added in 1.1.0
public final void setEnd(@NonNull Instant end)
Parameters
@NonNull Instant end

The Instant when this TimeInterval becomes invalid, must be after start

setStart

Added in 1.1.0
public final void setStart(@NonNull Instant start)
Parameters
@NonNull Instant start

The Instant when this TimeInterval becomes valid

toString

public @NonNull String toString()