Some simplifications of dynamic CA/Reconcilng using PartialCollection

This commit is contained in:
Kris De Volder
2017-07-28 14:48:57 -07:00
parent 1c25764ff4
commit b520fdc577
7 changed files with 139 additions and 72 deletions

View File

@@ -64,7 +64,7 @@ public class EnumValueParser implements ValueParser {
PartialCollection<String> values = this.values.get();
// If values is not known (null) then just assume the str is acceptable.
// If values is not fully known then just assume the str is acceptable.
if (values == null || !values.isComplete() || values.getElements().contains(str)) {
return str;
} else {

View File

@@ -10,6 +10,7 @@
*******************************************************************************/
package org.springframework.ide.vscode.commons.util;
import java.util.Arrays;
import java.util.Collection;
import java.util.concurrent.Callable;
@@ -132,4 +133,7 @@ public class PartialCollection<T> {
return explanation;
}
public PartialCollection<T> add(@SuppressWarnings("unchecked") T... values) {
return addAll(Arrays.asList(values));
}
}