X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fbin%2Fargparser%2FArgValues.java;h=8e4fe2cefead47bb4775841514923b4e0e43da80;hb=24e740c734e106a739dec7f31955f17103899641;hp=f25fc9ad0876497c21f86ce411fc64815087b70e;hpb=92c48abf7079358345432e020b72d025fc14f75d;p=jalview.git diff --git a/src/jalview/bin/argparser/ArgValues.java b/src/jalview/bin/argparser/ArgValues.java index f25fc9a..8e4fe2c 100644 --- a/src/jalview/bin/argparser/ArgValues.java +++ b/src/jalview/bin/argparser/ArgValues.java @@ -1,3 +1,23 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.bin.argparser; import java.util.ArrayList; @@ -151,9 +171,9 @@ public class ArgValues protected void addArgValue(ArgValue av, boolean beingSetByWildcard) { // allow a non-wildcard value to overwrite a wildcard set single value - boolean overwrite = !arg.hasOption(Opt.MULTI) && setByWildcard + boolean overwrite = !arg.hasOption(Opt.MULTIVALUE) && setByWildcard && !beingSetByWildcard; - if ((!arg.hasOption(Opt.MULTI) && argValueList.size() > 0) + if ((!arg.hasOption(Opt.MULTIVALUE) && argValueList.size() > 0) && !overwrite) return; if (arg.hasOption(Opt.NODUPLICATEVALUES) @@ -182,7 +202,7 @@ public class ArgValues protected ArgValue getArgValue() { - if (arg.hasOption(Opt.MULTI)) + if (arg.hasOption(Opt.MULTIVALUE)) Console.warn("Requesting single value for multi value argument"); return argValueList.size() > 0 ? argValueList.get(0) : null; }