X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Frest%2FInputType.java;fp=src%2Fjalview%2Fws%2Frest%2FInputType.java;h=65d833989c42d13067ceec51573433c6a93695c0;hb=304e64fb34b32659be1bbfd39fb4e15b2f79586e;hp=a96b6d9ba4fda00e9ba4240869905f6931cf44e1;hpb=61ff8fb4efa315c35149c9d11850d99e3d00c441;p=jalview.git diff --git a/src/jalview/ws/rest/InputType.java b/src/jalview/ws/rest/InputType.java index a96b6d9..65d8339 100644 --- a/src/jalview/ws/rest/InputType.java +++ b/src/jalview/ws/rest/InputType.java @@ -32,7 +32,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; @@ -60,9 +59,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()); @@ -77,7 +76,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 @@ -106,7 +105,9 @@ public abstract class InputType public boolean validFor(RestJob restJob) { if (!validFor(restJob.rsd)) + { return false; + } for (Class cl : inputData) { if (!restJob.hasDataOfType(cl)) @@ -120,7 +121,9 @@ public abstract class InputType public boolean validFor(RestServiceDescription restServiceDescription) { if (!restServiceDescription.inputParams.values().contains(this)) + { return false; + } return true; } @@ -272,7 +275,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", @@ -297,7 +300,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) {