Record Class TimeRangeInOut.TimeRangeHour
java.lang.Object
java.lang.Record
com.iohao.net.framework.core.flow.internal.TimeRangeInOut.TimeRangeHour
- Record Components:
hourTime- Hourcount- The number of action calls in one hourminuteList- Minute time ranges
- Enclosing class:
TimeRangeInOut
public static record TimeRangeInOut.TimeRangeHour(LocalTime hourTime, LongAdder count, List<TimeRangeInOut.TimeRangeMinute> minuteList)
extends Record
Hourly call statistics record holding the hour, total count, and per-minute breakdowns.
- Author:
- 渔民小镇
-
Constructor Summary
ConstructorsConstructorDescriptionTimeRangeHour(LocalTime hourTime, LongAdder count, List<TimeRangeInOut.TimeRangeMinute> minuteList) Creates an instance of aTimeRangeHourrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncount()Returns the value of thecountrecord component.static TimeRangeInOut.TimeRangeHourcreate(int hour, List<TimeRangeInOut.TimeRangeMinute> minuteList) Create an hourly statistics record for the given hour.final booleanIndicates whether some other object is "equal to" this one.intgetHour()Get the hour of day.final inthashCode()Returns a hash code value for this object.hourTime()Returns the value of thehourTimerecord component.Returns the value of theminuteListrecord component.@NonNull StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TimeRangeHour
public TimeRangeHour(LocalTime hourTime, LongAdder count, List<TimeRangeInOut.TimeRangeMinute> minuteList) Creates an instance of aTimeRangeHourrecord class.- Parameters:
hourTime- the value for thehourTimerecord componentcount- the value for thecountrecord componentminuteList- the value for theminuteListrecord component
-
-
Method Details
-
create
public static TimeRangeInOut.TimeRangeHour create(int hour, List<TimeRangeInOut.TimeRangeMinute> minuteList) Create an hourly statistics record for the given hour.- Parameters:
hour- the hour of day (0-23)minuteList- the minute-level statistics objects- Returns:
- a new
TimeRangeHourinstance
-
getHour
public int getHour()Get the hour of day.- Returns:
- the hour (0-23)
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
hourTime
-
count
-
minuteList
Returns the value of theminuteListrecord component.- Returns:
- the value of the
minuteListrecord component
-