X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Frest%2FInputType.java;h=c83879afba682bbf442539e03f9b25181c913862;hb=d7d522b7784d6ac65a008fe5f89ed7a4e7d8d2f7;hp=88431a6ff113d3550b03ce70bfad15677c3d1907;hpb=d4cfb06bee57ea32b921fd77220902d3f44db23a;p=jalview.git diff --git a/src/jalview/ws/rest/InputType.java b/src/jalview/ws/rest/InputType.java index 88431a6..c83879a 100644 --- a/src/jalview/ws/rest/InputType.java +++ b/src/jalview/ws/rest/InputType.java @@ -30,7 +30,6 @@ import jalview.ws.params.simple.Option; import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; import java.util.ArrayList; -import java.util.Collection; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -58,9 +57,9 @@ public abstract class InputType { NUC, PROT, MIX; - public static Collection toStringValues() + public static List toStringValues() { - Collection c = new ArrayList(); + List c = new ArrayList<>(); for (molType type : values()) { c.add(type.toString()); @@ -75,7 +74,7 @@ public abstract class InputType public int max = 0; // unbounded - protected ArrayList inputData = new ArrayList(); + protected List inputData = new ArrayList<>(); /** * initialise the InputType with a list of jalview data classes that the @@ -104,7 +103,9 @@ public abstract class InputType public boolean validFor(RestJob restJob) { if (!validFor(restJob.rsd)) + { return false; + } for (Class cl : inputData) { if (!restJob.hasDataOfType(cl)) @@ -118,7 +119,9 @@ public abstract class InputType public boolean validFor(RestServiceDescription restServiceDescription) { if (!restServiceDescription.inputParams.values().contains(this)) + { return false; + } return true; } @@ -270,7 +273,7 @@ public abstract class InputType public List getBaseOptions() { - ArrayList opts = new ArrayList(); + ArrayList opts = new ArrayList<>(); opts.add(new IntegerParameter("min", "Minimum number of data of this type", true, 1, min, 0, -1)); opts.add(new IntegerParameter("max", @@ -295,7 +298,7 @@ public abstract class InputType public void configureFromArgumentI(List currentSettings) throws InvalidArgumentException { - ArrayList urltoks = new ArrayList(); + List urltoks = new ArrayList<>(); String rg; for (ArgumentI arg : currentSettings) {