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

com.powsybl.dataframe.update.UpdatingDataframe Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (c) 2021, 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.dataframe.update;

import com.powsybl.dataframe.SeriesMetadata;

import java.util.List;
import java.util.Optional;
import java.util.OptionalInt;

/**
 * @author Etienne Lesot {@literal }
 */
public interface UpdatingDataframe {

    List getSeriesMetadata();

    DoubleSeries getDoubles(String column);

    IntSeries getInts(String column);

    StringSeries getStrings(String column);

    default Optional getStringValue(String column, int row) {
        StringSeries series = getStrings(column);
        return series != null ? Optional.of(series.get(row)) : Optional.empty();
    }

    default OptionalInt getIntValue(String column, int row) {
        IntSeries series = getInts(column);
        return series != null ? OptionalInt.of(series.get(row)) : OptionalInt.empty();
    }

    int getRowCount();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy