All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.intelie.liverig.plugin.curves.CurvesSettingsHolder Maven / Gradle / Ivy

The newest version!
package net.intelie.liverig.plugin.curves;

import net.intelie.live.Live;
import net.intelie.liverig.plugin.data.CurvesSettingLogData;
import net.intelie.liverig.plugin.settings.CurvesSettings;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.Map;

public interface CurvesSettingsHolder {

    CurvesSettings curvesSettings();

    /**
     * Atomically obtains an immutable copy of the full list of standard curves.
     */
    default Map getCurves() {
        return curvesSettings().getCurves();
    }

    default Live.Action registerObserver(@NotNull Live live, @NotNull CurvesObserver observer) throws Exception {
        return curvesSettings().registerObserver(live, observer);
    }

    default List loggedCurves(boolean includeData, @Nullable Integer page, @Nullable Integer pageSize) {
        return curvesSettings().loggedCurves(includeData, page, pageSize);
    }

    default Map loggedCurvesById(Integer id) {
        return curvesSettings().loggedCurveById(id);
    }

    /**
     * Obtains the curve for a given mnemonic.
     */
    default T getCurve(String mnemonic) {
        return getCurves().get(mnemonic);
    }


    Map saveToSettings(Map input);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy