Record Class Period

java.lang.Object
java.lang.Record
io.jenkins.plugins.batchcontrol.store.Period
Record Components:
from - inclusive start, or null for no lower bound
toExclusive - exclusive end, or null for no upper bound

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public record Period(Instant from, Instant toExclusive) extends Record
The time range of a page query (security-10 S-03): only records inside it count toward the query's record cap. Lines outside it are recognised from their raw timestamp and skipped without being parsed; reading stops at the first line appended before from.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Period
    No bounds: every record counts toward the cap.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Period(Instant from, Instant toExclusive)
    Creates an instance of a Period record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the from record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the toExclusive record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • ALL

      public static final Period ALL
      No bounds: every record counts toward the cap.
  • Constructor Details

    • Period

      public Period(@CheckForNull Instant from, @CheckForNull Instant toExclusive)
      Creates an instance of a Period record class.
      Parameters:
      from - the value for the from record component
      toExclusive - the value for the toExclusive 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • from

      @CheckForNull public Instant from()
      Returns the value of the from record component.
      Returns:
      the value of the from record component
    • toExclusive

      @CheckForNull public Instant toExclusive()
      Returns the value of the toExclusive record component.
      Returns:
      the value of the toExclusive record component