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:
-
Constructor Summary
ConstructorsConstructorDescriptionQuickStats(long available, long pending, long sold, long ordersPlaced, long ordersApproved, long ordersDelivered, long petTotal) Creates an instance of aQuickStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theavailablerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static StorePageBuilders.QuickStatsCounts the tiles from the store.longReturns the value of theordersApprovedrecord component.longReturns the value of theordersDeliveredrecord component.longReturns the value of theordersPlacedrecord component.longpending()Returns the value of thependingrecord component.longpetTotal()Returns the value of thepetTotalrecord component.longsold()Returns the value of thesoldrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
QuickStats
public QuickStats(long available, long pending, long sold, long ordersPlaced, long ordersApproved, long ordersDelivered, long petTotal) Creates an instance of aQuickStatsrecord class.- Parameters:
available- the value for theavailablerecord componentpending- the value for thependingrecord componentsold- the value for thesoldrecord componentordersPlaced- the value for theordersPlacedrecord componentordersApproved- the value for theordersApprovedrecord componentordersDelivered- the value for theordersDeliveredrecord componentpetTotal- the value for thepetTotalrecord component
-
-
Method Details
-
of
Counts the tiles from the store.- Parameters:
store- The store.- Returns:
- The tiles.
-
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. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
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 '=='. -
available
Returns the value of theavailablerecord component.- Returns:
- the value of the
availablerecord component
-
pending
Returns the value of thependingrecord component.- Returns:
- the value of the
pendingrecord component
-
sold
Returns the value of thesoldrecord component.- Returns:
- the value of the
soldrecord component
-
ordersPlaced
Returns the value of theordersPlacedrecord component.- Returns:
- the value of the
ordersPlacedrecord component
-
ordersApproved
Returns the value of theordersApprovedrecord component.- Returns:
- the value of the
ordersApprovedrecord component
-
ordersDelivered
Returns the value of theordersDeliveredrecord component.- Returns:
- the value of the
ordersDeliveredrecord component
-
petTotal
Returns the value of thepetTotalrecord component.- Returns:
- the value of the
petTotalrecord component
-