Record Class StorePageBuilders.QuickStats

java.lang.Object
java.lang.Record
org.apache.juneau.petstore.console.pages.StorePageBuilders.QuickStats
Record Components:
available - Available pets.
pending - Pending pets.
sold - Sold pets.
ordersPlaced - Placed orders.
ordersApproved - Approved orders.
ordersDelivered - Delivered orders.
petTotal - All pets, the inventory meter's maximum.
Enclosing class:
StorePageBuilders

public static record StorePageBuilders.QuickStats(long available, long pending, long sold, long ordersPlaced, long ordersApproved, long ordersDelivered, long petTotal) extends Record
The Store page's quick-stat tiles, shared by both render paths.
Example:

var qs = QuickStats.of(store);

  • Constructor Details

    • QuickStats

      public QuickStats(long available, long pending, long sold, long ordersPlaced, long ordersApproved, long ordersDelivered, long petTotal)
      Creates an instance of a QuickStats record class.
      Parameters:
      available - the value for the available record component
      pending - the value for the pending record component
      sold - the value for the sold record component
      ordersPlaced - the value for the ordersPlaced record component
      ordersApproved - the value for the ordersApproved record component
      ordersDelivered - the value for the ordersDelivered record component
      petTotal - the value for the petTotal record component
  • Method Details

    • of

      public static StorePageBuilders.QuickStats of(PetStore store)
      Counts the tiles from the store.
      Parameters:
      store - The store.
      Returns:
      The tiles.
    • 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. All components in this record class are compared with '=='.
      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.
    • available

      public long available()
      Returns the value of the available record component.
      Returns:
      the value of the available record component
    • pending

      public long pending()
      Returns the value of the pending record component.
      Returns:
      the value of the pending record component
    • sold

      public long sold()
      Returns the value of the sold record component.
      Returns:
      the value of the sold record component
    • ordersPlaced

      public long ordersPlaced()
      Returns the value of the ordersPlaced record component.
      Returns:
      the value of the ordersPlaced record component
    • ordersApproved

      public long ordersApproved()
      Returns the value of the ordersApproved record component.
      Returns:
      the value of the ordersApproved record component
    • ordersDelivered

      public long ordersDelivered()
      Returns the value of the ordersDelivered record component.
      Returns:
      the value of the ordersDelivered record component
    • petTotal

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