diff options
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/utilities/optionhandling/parameters/ListParameter.java')
-rw-r--r-- | src/de/lmu/ifi/dbs/elki/utilities/optionhandling/parameters/ListParameter.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/utilities/optionhandling/parameters/ListParameter.java b/src/de/lmu/ifi/dbs/elki/utilities/optionhandling/parameters/ListParameter.java index df520daa..b10a2779 100644 --- a/src/de/lmu/ifi/dbs/elki/utilities/optionhandling/parameters/ListParameter.java +++ b/src/de/lmu/ifi/dbs/elki/utilities/optionhandling/parameters/ListParameter.java @@ -4,7 +4,7 @@ package de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters; This file is part of ELKI: Environment for Developing KDD-Applications Supported by Index-Structures - Copyright (C) 2013 + Copyright (C) 2014 Ludwig-Maximilians-Universität München Lehr- und Forschungseinheit für Datenbanksysteme ELKI Development Team @@ -49,9 +49,9 @@ public abstract class ListParameter<THIS extends ListParameter<THIS, T>, T> exte public static final String LIST_SEP = ","; /** - * A pattern defining a ":". + * A pattern defining a ":" or ";". */ - public static final Pattern VECTOR_SPLIT = Pattern.compile(":"); + public static final Pattern VECTOR_SPLIT = Pattern.compile("[:;]"); /** * Vector separator character - ":" @@ -93,7 +93,7 @@ public abstract class ListParameter<THIS extends ListParameter<THIS, T>, T> exte * @return the size of this list parameter. */ public int getListSize() { - if (getValue() == null && isOptional()) { + if(getValue() == null && isOptional()) { return 0; } @@ -106,15 +106,15 @@ public abstract class ListParameter<THIS extends ListParameter<THIS, T>, T> exte */ // TODO: keep? remove? protected String asString() { - if (getValue() == null) { + if(getValue() == null) { return ""; } StringBuilder buffer = new StringBuilder(); buffer.append('['); - for (int i = 0; i < getValue().size(); i++) { + for(int i = 0; i < getValue().size(); i++) { buffer.append(getValue().get(i).toString()); - if (i != getValue().size() - 1) { + if(i != getValue().size() - 1) { buffer.append(','); } } |