Mercurial > dive4elements > river
view artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/WstSoundingIdPair.java @ 9268:ae9dee74e43e
Fixed: current station of duration chart was not changed
author | gernotbelger |
---|---|
date | Wed, 18 Jul 2018 18:53:15 +0200 |
parents | 5c34fe17ef15 |
children |
line wrap: on
line source
/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde * Software engineering by * Björnsen Beratende Ingenieure GmbH * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt * * This file is Free Software under the GNU AGPL (>=v3) * and comes with ABSOLUTELY NO WARRANTY! Check out the * documentation coming with Dive4Elements River for details. */ package org.dive4elements.river.artifacts.sinfo.flowdepth; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.dive4elements.river.backend.utils.StringUtil; /** * @author Gernot Belger */ public final class WstSoundingIdPair { private final String wstId; private final String soundingId; public WstSoundingIdPair(final String wstId, final String soundingId) { this.wstId = wstId; this.soundingId = soundingId; } public String getWstId() { return this.wstId; } public String getSoundingId() { return this.soundingId; } public static List<WstSoundingIdPair> parsePairs(final String diffids) { // FIXME: this way of parsing the datacage-ids is repeated all over flys! final String datas[] = diffids.split("#"); final List<WstSoundingIdPair> diffPairs = new ArrayList<>(datas.length); for (int i = 0; i < datas.length; i += 2) { final String soundingId = StringUtil.unbracket(datas[i]); final String wstId = StringUtil.unbracket(datas[i + 1]); diffPairs.add(new WstSoundingIdPair(wstId, soundingId)); } return Collections.unmodifiableList(diffPairs); } }