Package io.keikai.axyra.sheets
Record Class DateGroupItem
java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.DateGroupItem
- Record Components:
grouping- the period:"year","month","day","hour","minute"or"second"; another value makessetColumnDateFilterthrowAxyraExceptionyear- the four-digit year; outside 0 to 65535,setColumnDateFilterthrowsAxyraExceptionmonth- the 1-based month (1 to 12), ornullfor a year itemday- the day of the month (1 to 31), ornullbeyond the grouping's precisionhour- the hour of the day (0 to 23), ornullbeyond the grouping's precisionminute- the minute (0 to 59), ornullbeyond the grouping's precisionsecond- the second (0 to 59), ornullbeyond the grouping's precision
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. Pass
items to Sheet.setColumnDateFilter(int, DateGroupItem...). Fields
beyond the grouping's precision are null.
Prefer the static factories year(int),
month(int, int), day(int, int, int), hour,
minute and second; they set grouping and the
null fields correctly. The values are not range-checked here.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionday()Returns the value of thedayrecord component.static DateGroupItemday(int year, int month, int day) An item that selects one day;monthis 1-based,dayis 1 to 31.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) An item that selects one hour of a day;houris 0 to 23.minute()Returns the value of theminuterecord component.static DateGroupItemminute(int year, int month, int day, int hour, int minute) An item that selects one minute;houris 0 to 23,minute0 to 59.month()Returns the value of themonthrecord component.static DateGroupItemmonth(int year, int month) An item that selects a whole month;monthis 1-based (1 to 12).second()Returns the value of thesecondrecord component.static DateGroupItemsecond(int year, int month, int day, int hour, int minute, int second) An item that selects one second;minuteandsecondare 0 to 59.final StringtoString()Returns a string representation of this record class.intyear()Returns the value of theyearrecord component.static DateGroupItemyear(int year) An item that selects the whole calendaryear.
-
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
An item that selects the whole calendaryear. -
month
An item that selects a whole month;monthis 1-based (1 to 12). -
day
An item that selects one day;monthis 1-based,dayis 1 to 31. -
hour
An item that selects one hour of a day;houris 0 to 23. -
minute
An item that selects one minute;houris 0 to 23,minute0 to 59. -
second
An item that selects one second;minuteandsecondare 0 to 59. -
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
-