Class ModelScaler.Composite

java.lang.Object
kr.toxicity.model.api.tracker.ModelScaler.Composite
All Implemented Interfaces:
ModelScaler
Enclosing interface:
ModelScaler

public static final class ModelScaler.Composite extends Object implements ModelScaler
Implementation of a composite scaler.
Since:
1.15.2
  • Constructor Details

    • Composite

      public Composite()
  • Method Details

    • name

      @NotNull public @NotNull String name()
      Description copied from interface: ModelScaler
      Returns the name of this scaler type.
      Specified by:
      name in interface ModelScaler
      Returns:
      the name
    • scale

      public float scale(@NotNull @NotNull Tracker tracker)
      Description copied from interface: ModelScaler
      Calculates the scale for a given tracker.
      Specified by:
      scale in interface ModelScaler
      Parameters:
      tracker - the tracker
      Returns:
      the calculated scale factor
    • data

      public com.google.gson.JsonElement data()
      Description copied from interface: ModelScaler
      Returns the configuration data for this scaler as a JSON element.
      Specified by:
      data in interface ModelScaler
      Returns:
      the data, or null if none