Class TemperatureSource.Builder

java.lang.Object
com.github.thedeathlycow.thermoo.api.core.v2.source.TemperatureSource.Builder
Enclosing interface:
TemperatureSource

public static final class TemperatureSource.Builder extends Object
Builder interface for temperature sources, primarily intended for use with data generation.
  • Method Details

    • withReduction

      public TemperatureSource.Builder withReduction(TemperatureReduction reduction)
      Adds a reduction method to this builder.
      Parameters:
      reduction - The reduction method, may not be null.
      Returns:
      Returns this builder.
    • withTickInterval

      public TemperatureSource.Builder withTickInterval(int interval)
      Sets a tick interval for this temperature source.
      Parameters:
      interval - The interval between updates, in ticks. May not be negative.
      Returns:
      Returns this builder.
    • build

      public TemperatureSource build()
      Creates a new temperature source from this builder.