Record Class WebEngineHistory.DayTotals

java.lang.Object
java.lang.Record
com.iizix.server.webengine.WebEngineHistory.DayTotals
Record Components:
day - The day, UTC.
ended - The connects whose engine ended.
behind - The connects whose engine was behind.
patched - The connects whose engine was patched.
notAssessed - The connects not assessed.
Enclosing class:
WebEngineHistory

public static record WebEngineHistory.DayTotals(LocalDate day, long ended, long behind, long patched, long notAssessed) extends Record
The connects of one day per status.
Author:
Christopher Mindus
  • Constructor Summary

    Constructors
    Constructor
    Description
    DayTotals(LocalDate day, long ended, long behind, long patched, long notAssessed)
    Creates an instance of a DayTotals record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Gets the assessed connects: ended, behind and patched.
    long
    Returns the value of the behind record component.
    day()
    Returns the value of the day record component.
    long
    Returns the value of the ended record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the notAssessed record component.
    long
    Returns the value of the patched record component.
    final String
    Returns a string representation of this record class.
    int
    Gets the share of the assessed connects that were unpatched.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DayTotals

      public DayTotals(LocalDate day, long ended, long behind, long patched, long notAssessed)
      Creates an instance of a DayTotals record class.
      Parameters:
      day - the value for the day record component
      ended - the value for the ended record component
      behind - the value for the behind record component
      patched - the value for the patched record component
      notAssessed - the value for the notAssessed record component
  • Method Details

    • assessed

      public long assessed()
      Gets the assessed connects: ended, behind and patched.
      Returns:
      The count.
    • unpatchedPercent

      public int unpatchedPercent()
      Gets the share of the assessed connects that were unpatched.
      Returns:
      The percent, rounded, or -1 when nothing was assessed.
    • 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.
    • day

      public LocalDate day()
      Returns the value of the day record component.
      Returns:
      the value of the day record component
    • ended

      public long ended()
      Returns the value of the ended record component.
      Returns:
      the value of the ended record component
    • behind

      public long behind()
      Returns the value of the behind record component.
      Returns:
      the value of the behind record component
    • patched

      public long patched()
      Returns the value of the patched record component.
      Returns:
      the value of the patched record component
    • notAssessed

      public long notAssessed()
      Returns the value of the notAssessed record component.
      Returns:
      the value of the notAssessed record component