File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
src/main/java/io/github/malczuuu/problem4j/core Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ public interface ProblemBuilder {
66
77 ProblemBuilder type (URI type );
88
9+ ProblemBuilder type (String type );
10+
911 ProblemBuilder title (String title );
1012
1113 ProblemBuilder status (int status );
@@ -14,6 +16,8 @@ public interface ProblemBuilder {
1416
1517 ProblemBuilder instance (URI instance );
1618
19+ ProblemBuilder instance (String instance );
20+
1721 ProblemBuilder extension (String name , Object value );
1822
1923 Problem build ();
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ public ProblemBuilder type(URI type) {
2121 return this ;
2222 }
2323
24+ @ Override
25+ public ProblemBuilder type (String type ) {
26+ return type (URI .create (type ));
27+ }
28+
2429 @ Override
2530 public ProblemBuilder title (String title ) {
2631 this .title = title ;
@@ -45,6 +50,11 @@ public ProblemBuilder instance(URI instance) {
4550 return this ;
4651 }
4752
53+ @ Override
54+ public ProblemBuilder instance (String instance ) {
55+ return instance (URI .create (instance ));
56+ }
57+
4858 @ Override
4959 public ProblemBuilder extension (String name , Object value ) {
5060 extensions .put (name , value );
You can’t perform that action at this time.
0 commit comments