Class TemporalExpressions.Frequency

    • Field Detail

      • module

        public static final String module
      • freqCount

        protected final int freqCount
      • freqType

        protected final int freqType
      • start

        protected final Date start
    • Constructor Detail

      • Frequency

        public Frequency​(Date start,
                         int freqType,
                         int freqCount)
        Parameters:
        start - Starting date, defaults to current system time
        freqType - One of the following integer values: Calendar.SECOND Calendar.MINUTE Calendar.HOUR Calendar.DAY_OF_MONTH Calendar.MONTH Calendar.YEAR
        freqCount - A positive integer
    • Method Detail

      • first

        public com.ibm.icu.util.Calendar first​(com.ibm.icu.util.Calendar cal)
        Description copied from class: TemporalExpression
        Returns a date representing the first occurrence of this expression on or after a specified date. Returns null if there is no matching date.
        Specified by:
        first in class TemporalExpression
        Parameters:
        cal - A date to evaluate
        Returns:
        A Calendar instance representing the first matching date, or null if no matching date is found
      • getFreqCount

        public int getFreqCount()
        Returns the frequency count of this expression.
        Returns:
        The frequency count of this expression
      • getFreqType

        public int getFreqType()
        Returns the frequency type of this expression.
        Returns:
        The frequency type of this expression
      • getStartDate

        public Date getStartDate()
        Returns the start date of this expression.
        Returns:
        The start date of this expression
      • includesDate

        public boolean includesDate​(com.ibm.icu.util.Calendar cal)
        Description copied from class: TemporalExpression
        Returns true if this expression includes the specified date.
        Specified by:
        includesDate in class TemporalExpression
        Parameters:
        cal - A date to evaluate
        Returns:
        true if this expression includes the date represented by cal
      • isSubstitutionCandidate

        public boolean isSubstitutionCandidate​(com.ibm.icu.util.Calendar cal,
                                               TemporalExpression expressionToTest)
        Description copied from class: TemporalExpression
        Returns true if this expression is a candidate for substitution using the expression expressionToTest for the date cal. A Substitution object will call this method when it needs to know if this expression could have produced the date cal based on the expression expressionToTest.
        Specified by:
        isSubstitutionCandidate in class TemporalExpression
        Parameters:
        cal - A date to evaluate
        expressionToTest - An expression to evaluate
        Returns:
        true if this expression could have produced the date cal using the expression expressionToTest
      • prepareCal

        protected com.ibm.icu.util.Calendar prepareCal​(com.ibm.icu.util.Calendar cal)