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

com.powsybl.metrix.mapping.TimeSeriesMapperParameters Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
/*
 * Copyright (c) 2020, RTE (http://www.rte-france.com)
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * SPDX-License-Identifier: MPL-2.0
 */
package com.powsybl.metrix.mapping;

import com.google.common.collect.Range;

import java.util.*;

/**
 * @author Paul Bui-Quang {@literal }
 */
public class TimeSeriesMapperParameters {

    private final TreeSet versions;

    private final Range pointRange;

    private final boolean ignoreLimits;

    private final boolean ignoreEmptyFilter;

    private final boolean identifyConstantTimeSeries;

    private final float toleranceThreshold;

    private final Set requiredTimeseries;

    public TimeSeriesMapperParameters(NavigableSet versions, Range pointRange, boolean ignoreLimits, boolean ignoreEmptyFilter, boolean identifyConstantTimeSeries, float toleranceThreshold) {
        this(versions, pointRange, ignoreLimits, ignoreEmptyFilter, identifyConstantTimeSeries, Collections.emptySet(), toleranceThreshold);
    }

    public TimeSeriesMapperParameters(NavigableSet versions, Range pointRange, boolean ignoreLimits, boolean ignoreEmptyFilter,
                                      boolean identifyConstantTimeSeries, Set requiredTimeseries, float toleranceThreshold) {
        this.versions = new TreeSet<>(Objects.requireNonNull(versions));
        this.pointRange = Objects.requireNonNull(pointRange);
        this.ignoreLimits = ignoreLimits;
        this.ignoreEmptyFilter = ignoreEmptyFilter;
        this.identifyConstantTimeSeries = identifyConstantTimeSeries;
        this.toleranceThreshold = toleranceThreshold;
        this.requiredTimeseries = Objects.requireNonNull(requiredTimeseries);
    }

    public NavigableSet getVersions() {
        return Collections.unmodifiableNavigableSet(versions);
    }

    public Range getPointRange() {
        return pointRange;
    }

    public boolean isIgnoreLimits() {
        return ignoreLimits;
    }

    public boolean isIgnoreEmptyFilter() {
        return ignoreEmptyFilter;
    }

    public boolean isIdentifyConstantTimeSeries() {
        return identifyConstantTimeSeries;
    }

    public float getToleranceThreshold() {
        return toleranceThreshold;
    }

    public Set getRequiredTimeseries() {
        return requiredTimeseries;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy