File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
main/java/com/github/underscore/lodash
test/java/com/github/underscore/lodash Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2271,6 +2271,11 @@ public Builder add(final Object value) {
22712271 return this ;
22722272 }
22732273
2274+ public Builder set (final String path , final Object value ) {
2275+ U .set (data , path , value );
2276+ return this ;
2277+ }
2278+
22742279 public Builder add (final Builder builder ) {
22752280 data .putAll (builder .data );
22762281 return this ;
Original file line number Diff line number Diff line change @@ -754,7 +754,6 @@ public void removeMinusesAndConvertNumbers() {
754754 assertEquals ("{list=[[]]}" , result10 .toString ());
755755 }
756756
757-
758757 @ Test
759758 public void objectBuilder () {
760759 U .Builder builder = U .objectBuilder ().add ("1" , "2" ).add ("2" );
@@ -763,7 +762,8 @@ public void objectBuilder() {
763762 U .Builder .fromJson ("{}" );
764763 builder .toXml ();
765764 U .Builder .fromXml ("<a/>" );
766- assertEquals ("{1=2}" , builder .build ().toString ());
765+ builder .set ("1" , "3" );
766+ assertEquals ("{1=3}" , builder .build ().toString ());
767767 }
768768
769769 @ SuppressWarnings ("unchecked" )
You can’t perform that action at this time.
0 commit comments