Package com.tnsai.llm.cost
Record Class BudgetManager.BudgetAlert
java.lang.Object
java.lang.Record
com.tnsai.llm.cost.BudgetManager.BudgetAlert
- Enclosing class:
BudgetManager
public static record BudgetManager.BudgetAlert(BudgetManager.BudgetAlertType type, double threshold, BigDecimal currentSpend, BigDecimal limit, BigDecimal remaining)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBudgetAlert(BudgetManager.BudgetAlertType type, double threshold, BigDecimal currentSpend, BigDecimal limit, BigDecimal remaining) Creates an instance of aBudgetAlertrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrentSpendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.limit()Returns the value of thelimitrecord component.Returns the value of theremainingrecord component.doubleReturns the value of thethresholdrecord component.toString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
BudgetAlert
public BudgetAlert(BudgetManager.BudgetAlertType type, double threshold, BigDecimal currentSpend, BigDecimal limit, BigDecimal remaining) Creates an instance of aBudgetAlertrecord class.- Parameters:
type- the value for thetyperecord componentthreshold- the value for thethresholdrecord componentcurrentSpend- the value for thecurrentSpendrecord componentlimit- the value for thelimitrecord componentremaining- the value for theremainingrecord component
-
-
Method Details
-
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
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
threshold
public double threshold()Returns the value of thethresholdrecord component.- Returns:
- the value of the
thresholdrecord component
-
currentSpend
Returns the value of thecurrentSpendrecord component.- Returns:
- the value of the
currentSpendrecord component
-
limit
Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
remaining
Returns the value of theremainingrecord component.- Returns:
- the value of the
remainingrecord component
-