Class TimePeriod

java.lang.Object
com.espertech.esper.common.client.util.TimePeriod
All Implemented Interfaces:
Serializable

public class TimePeriod extends Object implements Serializable
Represents a time period.
See Also:
  • Field Details

    • EPTYPE

      public static final EPTypeClass EPTYPE
      Type information
  • Constructor Details

    • TimePeriod

      public TimePeriod(Integer years, Integer months, Integer weeks, Integer days, Integer hours, Integer minutes, Integer seconds, Integer milliseconds, Integer microseconds)
      Ctor.
      Parameters:
      years - years
      months - month
      weeks - weeks
      days - days
      hours - hours
      minutes - minutes
      seconds - seconds
      milliseconds - milliseconds
      microseconds - microseconds
    • TimePeriod

      public TimePeriod()
      Ctor.
  • Method Details

    • getYears

      public Integer getYears()
      Returns years or null if not provided.
      Returns:
      years
    • getMonths

      public Integer getMonths()
      Returns months or null if not provided.
      Returns:
      months
    • getWeeks

      public Integer getWeeks()
      Returns weeks or null if not provided.
      Returns:
      weeks
    • getDays

      public Integer getDays()
      Returns days or null if not provided.
      Returns:
      days
    • getHours

      public Integer getHours()
      Returns hours or null if not provided.
      Returns:
      hours
    • getMinutes

      public Integer getMinutes()
      Returns minutes or null if not provided.
      Returns:
      minutes
    • getSeconds

      public Integer getSeconds()
      Returns seconds or null if not provided.
      Returns:
      seconds
    • getMilliseconds

      public Integer getMilliseconds()
      Returns milliseconds or null if not provided.
      Returns:
      millis
    • getMicroseconds

      public Integer getMicroseconds()
      Returns microseconds or null if not provided.
      Returns:
      micros
    • setYears

      public void setYears(Integer years)
      Sets years or null if not provided.
      Parameters:
      years - to set
    • setMonths

      public void setMonths(Integer months)
      Sets months or null if not provided.
      Parameters:
      months - to set
    • setWeeks

      public void setWeeks(Integer weeks)
      Sets weeks or null if not provided.
      Parameters:
      weeks - to set
    • setDays

      public void setDays(Integer days)
      Sets days or null if not provided.
      Parameters:
      days - to set
    • setHours

      public void setHours(Integer hours)
      Sets hours or null if not provided.
      Parameters:
      hours - to set
    • setMinutes

      public void setMinutes(Integer minutes)
      Sets minutes or null if not provided.
      Parameters:
      minutes - to set
    • setSeconds

      public void setSeconds(Integer seconds)
      Sets seconds or null if not provided.
      Parameters:
      seconds - to set
    • setMilliseconds

      public void setMilliseconds(Integer milliseconds)
      Sets milliseconds or null if not provided.
      Parameters:
      milliseconds - to set
    • setMicroseconds

      public void setMicroseconds(Integer microseconds)
      Sets microseconds or null if not provided.
      Parameters:
      microseconds - to set
    • years

      public TimePeriod years(Integer years)
      Ctor for chain.
      Parameters:
      years - years
      Returns:
      time period
    • months

      public TimePeriod months(Integer months)
      Ctor for chain.
      Parameters:
      months - months
      Returns:
      time period
    • weeks

      public TimePeriod weeks(Integer weeks)
      Ctor for chain.
      Parameters:
      weeks - weeks
      Returns:
      time period
    • days

      public TimePeriod days(Integer days)
      Ctor for chain.
      Parameters:
      days - days
      Returns:
      time period
    • hours

      public TimePeriod hours(Integer hours)
      Ctor for chain.
      Parameters:
      hours - hours
      Returns:
      time period
    • min

      public TimePeriod min(Integer minutes)
      Ctor for chain.
      Parameters:
      minutes - minutes
      Returns:
      time period
    • sec

      public TimePeriod sec(Integer seconds)
      Ctor for chain.
      Parameters:
      seconds - seconds
      Returns:
      time period
    • millis

      public TimePeriod millis(Integer milliseconds)
      Ctor for chain.
      Parameters:
      milliseconds - millis
      Returns:
      time period
    • micros

      public TimePeriod micros(Integer microseconds)
      Ctor for chain.
      Parameters:
      microseconds - micros
      Returns:
      time period
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toStringISO8601

      public String toStringISO8601()
      Returns ISO8601 string.
      Returns:
      formatted
    • largestAbsoluteValue

      public Integer largestAbsoluteValue()
      Returns the largest absolute value.
      Returns:
      largest absolute value