Record Class OptimizationPipeline.Phase

java.lang.Object
java.lang.Record
com.darkcollective.relix.optimizer.internal.OptimizationPipeline.Phase
Record Components:
name - short stable identifier, e.g. "pushdown"
rules - the rules, in application order; must not be empty
maxIterations - how many sweeps this phase may run; OptimizationPipeline.SINGLE_PASS for a phase that must run once
Enclosing class:
OptimizationPipeline

public static record OptimizationPipeline.Phase(String name, List<OptimizationRule> rules, int maxIterations) extends Record
One group of rules, applied in order and re-applied while they keep making progress.
  • Constructor Details

    • Phase

      public Phase(String name, List<OptimizationRule> rules, int maxIterations)
      Validates and defensively copies the rule list.
  • Method Details

    • iterated

      public boolean iterated()
      Returns whether this phase may run more than one sweep.
      Returns:
      true when maxIterations() > 1
    • 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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • rules

      public List<OptimizationRule> rules()
      Returns the value of the rules record component.
      Returns:
      the value of the rules record component
    • maxIterations

      public int maxIterations()
      Returns the value of the maxIterations record component.
      Returns:
      the value of the maxIterations record component