Package io.keikai.axyra.sheets
Record Class DateGroupItem
java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.DateGroupItem
public record DateGroupItem(String grouping, int year, Integer month, Integer day, Integer hour, Integer minute, Integer second)
extends Record
One date grouping item of a date auto-filter (ECMA-376 §18.3.2.4
dateGroupItem, §18.18.24 ST_DateTimeGrouping): selects every date/time
cell inside the period named by
grouping. Fields beyond the
grouping precision are null.
Use the static factories: year(int), month(int, int),
day(int, int, int), hour, minute,
second.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionday()Returns the value of thedayrecord component.static DateGroupItemday(int year, int month, int day) Select a single day.final booleanIndicates whether some other object is "equal to" this one.grouping()Returns the value of thegroupingrecord component.final inthashCode()Returns a hash code value for this object.hour()Returns the value of thehourrecord component.static DateGroupItemhour(int year, int month, int day, int hour) Select a single hour of a day (0-23).minute()Returns the value of theminuterecord component.static DateGroupItemminute(int year, int month, int day, int hour, int minute) Select a single minute.month()Returns the value of themonthrecord component.static DateGroupItemmonth(int year, int month) Select a whole month (monthis 1-based).second()Returns the value of thesecondrecord component.static DateGroupItemsecond(int year, int month, int day, int hour, int minute, int second) Select a single second.final StringtoString()Returns a string representation of this record class.intyear()Returns the value of theyearrecord component.static DateGroupItemyear(int year) Select the whole calendar year.
-
Constructor Details
-
DateGroupItem
public DateGroupItem(String grouping, int year, Integer month, Integer day, Integer hour, Integer minute, Integer second) Creates an instance of aDateGroupItemrecord class.- Parameters:
grouping- the value for thegroupingrecord componentyear- the value for theyearrecord componentmonth- the value for themonthrecord componentday- the value for thedayrecord componenthour- the value for thehourrecord componentminute- the value for theminuterecord componentsecond- the value for thesecondrecord component
-
-
Method Details
-
year
Select the whole calendar year. -
month
Select a whole month (monthis 1-based). -
day
Select a single day. -
hour
Select a single hour of a day (0-23). -
minute
Select a single minute. -
second
Select a single second. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
grouping
Returns the value of thegroupingrecord component.- Returns:
- the value of the
groupingrecord component
-
year
public int year()Returns the value of theyearrecord component.- Returns:
- the value of the
yearrecord component
-
month
Returns the value of themonthrecord component.- Returns:
- the value of the
monthrecord component
-
day
Returns the value of thedayrecord component.- Returns:
- the value of the
dayrecord component
-
hour
Returns the value of thehourrecord component.- Returns:
- the value of the
hourrecord component
-
minute
Returns the value of theminuterecord component.- Returns:
- the value of the
minuterecord component
-
second
Returns the value of thesecondrecord component.- Returns:
- the value of the
secondrecord component
-