Record Class AggregateFunction.Window

java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.query.pipeline.AggregateFunction.Window
Enclosing interface:
AggregateFunction<ACC>

public static record AggregateFunction.Window(long startMs, long endMs, @Nullable AggregateFunction.PriorSample prior, QualityLevelFilter admit, boolean sloped) extends Record
The window a fold opens: its bounds in epoch milliseconds ([startMs, endMs), the end clipped to the query range), the sample in effect at its start when one is known, the levels the query's quality filter admits, and whether the signal ramps linearly between samples (sloped) or holds each value until the next.
  • Constructor Details

    • Window

      public Window(long startMs, long endMs, @Nullable AggregateFunction.PriorSample prior, QualityLevelFilter admit, boolean sloped)
      Creates an instance of a Window record class.
      Parameters:
      startMs - the value for the startMs record component
      endMs - the value for the endMs record component
      prior - the value for the prior record component
      admit - the value for the admit record component
      sloped - the value for the sloped record component
  • Method Details

    • unbounded

      public static AggregateFunction.Window unbounded(QualityLevelFilter admit)
      No bounds, no prior, stepped, admitting by admit: the raw and event-driven folds.
    • bounded

      public boolean bounded()
      Whether the window has bounds a time integral can cover.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • startMs

      public long startMs()
      Returns the value of the startMs record component.
      Returns:
      the value of the startMs record component
    • endMs

      public long endMs()
      Returns the value of the endMs record component.
      Returns:
      the value of the endMs record component
    • prior

      public @Nullable AggregateFunction.PriorSample prior()
      Returns the value of the prior record component.
      Returns:
      the value of the prior record component
    • admit

      public QualityLevelFilter admit()
      Returns the value of the admit record component.
      Returns:
      the value of the admit record component
    • sloped

      public boolean sloped()
      Returns the value of the sloped record component.
      Returns:
      the value of the sloped record component