Record Class BusinessHourSlot
java.lang.Object
java.lang.Record
one.cafebabe.businesscalendar4j.BusinessHourSlot
- レコード・コンポーネント:
from- start time of the business hour slotto- end time of the business hour slot
- すべての実装されたインタフェース:
Serializable
public record BusinessHourSlot(@NotNull LocalDateTime from, @NotNull LocalDateTime to)
extends Record
implements Serializable
Represents a slot of business hours defined by a starting and ending time.
This class is immutable and thread-safe, and it also implements the Serializable interface.
The time range is represented using LocalDateTime objects for both the from and to parameters. The BusinessHourSlot object can be constructed using either LocalDateTime or by providing a LocalDate along with LocalTime for starting and ending times.
The end time is adjusted to be on the next day if it represents the start of the next day (00:00).
- 関連項目:
-
コンストラクタの概要
コンストラクタコンストラクタ説明BusinessHourSlot(@NotNull LocalDateTime from, @NotNull LocalDateTime to) BusinessHourSlotレコードのインスタンスを作成します。 -
メソッドの概要
-
コンストラクタの詳細
-
メソッドの詳細
-
toString
このレコードの文字列表現を返します。表現には、型の名前に続けて各レコード・コンポーネントの名前と値が含まれます。 -
hashCode
public final int hashCode()このオブジェクトのハッシュ・コード値を返します。値は、各レコード・コンポーネントのハッシュ・コードから導出されます。 -
equals
他のオブジェクトがこれと"等しい"かどうかを示します。他のオブジェクトが同じクラスであり、すべてのレコード・コンポーネントが等しい場合、オブジェクトは等しくなります。 このレコード内のすべてのコンポーネントはObjects::equals(Object,Object)と比較されます。 -
from
fromレコード・コンポーネントの値が返されます。- 戻り値:
fromレコード・コンポーネントの値
-
to
toレコード・コンポーネントの値が返されます。- 戻り値:
toレコード・コンポーネントの値
-