Split out restconf-api
[netconf.git] / protocol / restconf-api / src / main / java / org / opendaylight / restconf / api / query / PrettyPrintParam.java
similarity index 82%
rename from restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/PrettyPrintParam.java
rename to protocol/restconf-api/src/main/java/org/opendaylight/restconf/api/query/PrettyPrintParam.java
index 80457a01ad35dc72e422a0b73d1d8621a38fd483..a2cdead7e7ad7c958e0d8f420eed033d16ceaab5 100644 (file)
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.restconf.nb.rfc8040;
+package org.opendaylight.restconf.api.query;
 
 import java.net.URI;
 import org.eclipse.jdt.annotation.NonNull;
@@ -35,18 +35,15 @@ public final class PrettyPrintParam implements RestconfQueryParam<PrettyPrintPar
     }
 
     public static @NonNull PrettyPrintParam forUriValue(final String uriValue) {
-        switch (uriValue) {
-            case "false":
-                return FALSE;
-            case "true":
-                return TRUE;
-            default:
-                throw new IllegalArgumentException("Value can be 'false' or 'true', not '" + uriValue + "'");
-        }
+        return switch (uriValue) {
+            case "false" -> FALSE;
+            case "true" -> TRUE;
+            default -> throw new IllegalArgumentException("Value can be 'false' or 'true', not '" + uriValue + "'");
+        };
     }
 
     @Override
-    public Class<@NonNull PrettyPrintParam> javaClass() {
+    public Class<PrettyPrintParam> javaClass() {
         return PrettyPrintParam.class;
     }