Record Class AccountLedgerPendingStateDTO

java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.api.dto.account.AccountLedgerPendingStateDTO
Record Components:
positionNumber - position number
positionName - position name
openQuantity - quantity remaining open
closedQuantity - quantity closed before final closure
pendingRealizedAmount - cumulative pending realized result
partialClosureCount - contributing closing order count
lastPartialClosureAt - most recent contributing close timestamp

public record AccountLedgerPendingStateDTO(long positionNumber, String positionName, double openQuantity, double closedQuantity, double pendingRealizedAmount, int partialClosureCount, LocalDateTime lastPartialClosureAt) extends Record
Immutable replay state for one position's pending partial-close activity.
Version:
3.0.1
Author:
Stephen Prizio
  • Constructor Details

    • AccountLedgerPendingStateDTO

      public AccountLedgerPendingStateDTO(long positionNumber, String positionName, double openQuantity, double closedQuantity, double pendingRealizedAmount, int partialClosureCount, LocalDateTime lastPartialClosureAt)
      Creates an instance of a AccountLedgerPendingStateDTO record class.
      Parameters:
      positionNumber - the value for the positionNumber record component
      positionName - the value for the positionName record component
      openQuantity - the value for the openQuantity record component
      closedQuantity - the value for the closedQuantity record component
      pendingRealizedAmount - the value for the pendingRealizedAmount record component
      partialClosureCount - the value for the partialClosureCount record component
      lastPartialClosureAt - the value for the lastPartialClosureAt record component
  • Method Details

    • 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.
    • positionNumber

      public long positionNumber()
      Returns the value of the positionNumber record component.
      Returns:
      the value of the positionNumber record component
    • positionName

      public String positionName()
      Returns the value of the positionName record component.
      Returns:
      the value of the positionName record component
    • openQuantity

      public double openQuantity()
      Returns the value of the openQuantity record component.
      Returns:
      the value of the openQuantity record component
    • closedQuantity

      public double closedQuantity()
      Returns the value of the closedQuantity record component.
      Returns:
      the value of the closedQuantity record component
    • pendingRealizedAmount

      public double pendingRealizedAmount()
      Returns the value of the pendingRealizedAmount record component.
      Returns:
      the value of the pendingRealizedAmount record component
    • partialClosureCount

      public int partialClosureCount()
      Returns the value of the partialClosureCount record component.
      Returns:
      the value of the partialClosureCount record component
    • lastPartialClosureAt

      public LocalDateTime lastPartialClosureAt()
      Returns the value of the lastPartialClosureAt record component.
      Returns:
      the value of the lastPartialClosureAt record component