Record Class BucketTracker
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.generator.BucketTracker
- Record Components:
variable- the pre-loop variable holding the tracker instancehelperType- the Ek9 runtime helper backing it (Ek9Group / Ek9Split)producesType- the collection type each completed bucket is emitted as. Its name is DERIVED here rather than carried alongside - the two used to travel as separate parameters that could in principle disagree
record BucketTracker(String variable, String helperType, IAggregateSymbol producesType)
extends Record
The runtime tracker a bucketing stage accumulates into, and what it hands downstream.
group and split run the identical emission algorithm and differ only in which Ek9
helper they track with and how their boundary is decided, so these three values are exactly what
varies between them.
-
Constructor Summary
ConstructorsConstructorDescriptionBucketTracker(String variable, String helperType, IAggregateSymbol producesType) Creates an instance of aBucketTrackerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thehelperTyperecord component.Returns the value of theproducesTyperecord component.(package private) Stringfinal StringtoString()Returns a string representation of this record class.variable()Returns the value of thevariablerecord component.
-
Constructor Details
-
BucketTracker
BucketTracker(String variable, String helperType, IAggregateSymbol producesType) Creates an instance of aBucketTrackerrecord class.- Parameters:
variable- the value for thevariablerecord componenthelperType- the value for thehelperTyperecord componentproducesType- the value for theproducesTyperecord component
-
-
Method Details
-
producesTypeName
String producesTypeName() -
toString
-
hashCode
-
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 withObjects::equals(Object,Object). -
variable
-
helperType
Returns the value of thehelperTyperecord component.- Returns:
- the value of the
helperTyperecord component
-
producesType
Returns the value of theproducesTyperecord component.- Returns:
- the value of the
producesTyperecord component
-