Record Class DataPeriod

java.lang.Object
java.lang.Record
app.valuationcontrol.multimodule.library.helpers.DataPeriod
Record Components:
myModel - is the attached model
periodOffset - is the current period being assessed (example : -1 for historical period and 5 for projection period)
segmentOffsetFactor - is the multiplier to be applied to segment offset length (model.getNumberOfPeriods)

public record DataPeriod(Model myModel, Integer periodOffset, Integer segmentOffsetFactor, boolean isConstant) extends Record
  • Constructor Details

    • DataPeriod

      public DataPeriod(Model myModel, Integer periodOffset, Integer segmentOffsetFactor, boolean isConstant)
      Creates an instance of a DataPeriod record class.
      Parameters:
      myModel - the value for the myModel record component
      periodOffset - the value for the periodOffset record component
      segmentOffsetFactor - the value for the segmentOffsetFactor record component
      isConstant - the value for the isConstant record component
  • Method Details

    • getTotalOffsetAsInteger

      public Integer getTotalOffsetAsInteger()
    • getColumn

      public Integer getColumn()
    • getSegmentOffsetAsInteger

      public Integer getSegmentOffsetAsInteger()
    • lowBound

      public Integer lowBound()
    • highBound

      public Integer highBound()
    • isWithinBound

      public boolean isWithinBound(Integer periodToCheck)
    • previousPeriod

      public DataPeriod previousPeriod()
    • 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 '=='.
      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.
    • myModel

      public Model myModel()
      Returns the value of the myModel record component.
      Returns:
      the value of the myModel record component
    • periodOffset

      public Integer periodOffset()
      Returns the value of the periodOffset record component.
      Returns:
      the value of the periodOffset record component
    • segmentOffsetFactor

      public Integer segmentOffsetFactor()
      Returns the value of the segmentOffsetFactor record component.
      Returns:
      the value of the segmentOffsetFactor record component
    • isConstant

      public boolean isConstant()
      Returns the value of the isConstant record component.
      Returns:
      the value of the isConstant record component