Skip to content

Commit 236c6d7

Browse files
committed
Value API: move hash/array to top level classes
1 parent 70ad204 commit 236c6d7

File tree

19 files changed

+490
-373
lines changed

19 files changed

+490
-373
lines changed

jooby/src/main/java/io/jooby/Context.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package io.jooby;
1717

18+
import io.jooby.internal.MissingValue;
19+
import io.jooby.internal.SingleValue;
1820
import io.jooby.internal.UrlParser;
1921
import io.netty.buffer.ByteBuf;
2022

@@ -155,8 +157,8 @@ public interface Context {
155157
@Nonnull default Value path(@Nonnull String name) {
156158
String value = pathMap().get(name);
157159
return value == null
158-
? new Value.Missing(name)
159-
: new Value.Single(name, UrlParser.decodePath(value));
160+
? new MissingValue(name)
161+
: new SingleValue(name, UrlParser.decodePath(value));
160162
}
161163

162164
/**

jooby/src/main/java/io/jooby/FileUpload.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package io.jooby;
1717

18+
import io.jooby.internal.MissingValue;
19+
1820
import javax.annotation.Nonnull;
1921
import javax.annotation.Nullable;
2022
import java.io.InputStream;
@@ -64,7 +66,7 @@ public interface FileUpload extends Value {
6466
}
6567

6668
@Override default Value get(@Nonnull String name) {
67-
return new Missing(name);
69+
return new MissingValue(name);
6870
}
6971

7072
@Override default int size() {

jooby/src/main/java/io/jooby/Formdata.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
*/
1616
package io.jooby;
1717

18+
import io.jooby.internal.HashValue;
19+
1820
/**
1921
* Formdata class for direct MVC parameter provisioning.
2022
*
2123
* HTTP request must be encoded as {@link MediaType#FORM_URLENCODED}.
2224
*/
23-
public class Formdata extends Value.Hash {
25+
public class Formdata extends HashValue {
2426
}

jooby/src/main/java/io/jooby/QueryString.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package io.jooby;
1717

18+
import io.jooby.internal.HashValue;
19+
1820
import javax.annotation.Nonnull;
1921

2022
/**
@@ -23,7 +25,7 @@
2325
* @author edgar
2426
* @since 2.0.0
2527
*/
26-
public class QueryString extends Value.Hash {
28+
public class QueryString extends HashValue {
2729
/** Empty query string. */
2830
public static final QueryString EMPTY = new QueryString("");
2931

0 commit comments

Comments
 (0)