@@ -521,12 +521,6 @@ public UriComponentsBuilder uriComponents(UriComponents uriComponents) {
521
521
return this ;
522
522
}
523
523
524
- /**
525
- * Set the URI scheme. The given scheme may contain URI template variables,
526
- * and may also be {@code null} to clear the scheme of this builder.
527
- * @param scheme the URI scheme
528
- * @return this UriComponentsBuilder
529
- */
530
524
@ Override
531
525
public UriComponentsBuilder scheme (@ Nullable String scheme ) {
532
526
this .scheme = scheme ;
@@ -547,37 +541,20 @@ public UriComponentsBuilder schemeSpecificPart(String ssp) {
547
541
return this ;
548
542
}
549
543
550
- /**
551
- * Set the URI user info. The given user info may contain URI template variables,
552
- * and may also be {@code null} to clear the user info of this builder.
553
- * @param userInfo the URI user info
554
- * @return this UriComponentsBuilder
555
- */
556
544
@ Override
557
545
public UriComponentsBuilder userInfo (@ Nullable String userInfo ) {
558
546
this .userInfo = userInfo ;
559
547
resetSchemeSpecificPart ();
560
548
return this ;
561
549
}
562
550
563
- /**
564
- * Set the URI host. The given host may contain URI template variables,
565
- * and may also be {@code null} to clear the host of this builder.
566
- * @param host the URI host
567
- * @return this UriComponentsBuilder
568
- */
569
551
@ Override
570
552
public UriComponentsBuilder host (@ Nullable String host ) {
571
553
this .host = host ;
572
554
resetSchemeSpecificPart ();
573
555
return this ;
574
556
}
575
557
576
- /**
577
- * Set the URI port. Passing {@code -1} will clear the port of this builder.
578
- * @param port the URI port
579
- * @return this UriComponentsBuilder
580
- */
581
558
@ Override
582
559
public UriComponentsBuilder port (int port ) {
583
560
Assert .isTrue (port >= -1 , "Port must be >= -1" );
@@ -586,52 +563,27 @@ public UriComponentsBuilder port(int port) {
586
563
return this ;
587
564
}
588
565
589
- /**
590
- * Set the URI port. Use this method only when the port needs to be
591
- * parameterized with a URI variable. Otherwise use {@link #port(int)}.
592
- * Passing {@code null} will clear the port of this builder.
593
- * @param port the URI port
594
- * @return this UriComponentsBuilder
595
- */
596
566
@ Override
597
567
public UriComponentsBuilder port (@ Nullable String port ) {
598
568
this .port = port ;
599
569
resetSchemeSpecificPart ();
600
570
return this ;
601
571
}
602
572
603
- /**
604
- * Append the given path to the existing path of this builder.
605
- * The given path may contain URI template variables.
606
- * @param path the URI path
607
- * @return this UriComponentsBuilder
608
- */
609
573
@ Override
610
574
public UriComponentsBuilder path (String path ) {
611
575
this .pathBuilder .addPath (path );
612
576
resetSchemeSpecificPart ();
613
577
return this ;
614
578
}
615
579
616
- /**
617
- * Append path segments to the existing path. Each path segment may contain
618
- * URI template variables and should not contain any slashes.
619
- * Use {@code path("/")} subsequently to ensure a trailing slash.
620
- * @param pathSegments the URI path segments
621
- * @return this UriComponentsBuilder
622
- */
623
580
@ Override
624
581
public UriComponentsBuilder pathSegment (String ... pathSegments ) throws IllegalArgumentException {
625
582
this .pathBuilder .addPathSegments (pathSegments );
626
583
resetSchemeSpecificPart ();
627
584
return this ;
628
585
}
629
586
630
- /**
631
- * Set the path of this builder overriding all existing path and path segment values.
632
- * @param path the URI path (a {@code null} value results in an empty path)
633
- * @return this UriComponentsBuilder
634
- */
635
587
@ Override
636
588
public UriComponentsBuilder replacePath (@ Nullable String path ) {
637
589
this .pathBuilder = new CompositePathComponentBuilder ();
@@ -642,22 +594,6 @@ public UriComponentsBuilder replacePath(@Nullable String path) {
642
594
return this ;
643
595
}
644
596
645
- /**
646
- * Append the given query to the existing query of this builder.
647
- * The given query may contain URI template variables.
648
- * <p><strong>Note:</strong> The presence of reserved characters can prevent
649
- * correct parsing of the URI string. For example if a query parameter
650
- * contains {@code '='} or {@code '&'} characters, the query string cannot
651
- * be parsed unambiguously. Such values should be substituted for URI
652
- * variables to enable correct parsing:
653
- * <pre class="code">
654
- * UriComponentsBuilder.fromUriString("/hotels/42")
655
- * .query("filter={value}")
656
- * .buildAndExpand("hot&cold");
657
- * </pre>
658
- * @param query the query string
659
- * @return this UriComponentsBuilder
660
- */
661
597
@ Override
662
598
public UriComponentsBuilder query (@ Nullable String query ) {
663
599
if (query != null ) {
@@ -676,11 +612,6 @@ public UriComponentsBuilder query(@Nullable String query) {
676
612
return this ;
677
613
}
678
614
679
- /**
680
- * Set the query of this builder overriding all existing query parameters.
681
- * @param query the query string; a {@code null} value removes all query parameters.
682
- * @return this UriComponentsBuilder
683
- */
684
615
@ Override
685
616
public UriComponentsBuilder replaceQuery (@ Nullable String query ) {
686
617
this .queryParams .clear ();
@@ -691,16 +622,6 @@ public UriComponentsBuilder replaceQuery(@Nullable String query) {
691
622
return this ;
692
623
}
693
624
694
- /**
695
- * Append the given query parameter to the existing query parameters. The
696
- * given name or any of the values may contain URI template variables. If no
697
- * values are given, the resulting URI will contain the query parameter name
698
- * only (i.e. {@code ?foo} instead of {@code ?foo=bar}).
699
- * @param name the query parameter name
700
- * @param values the query parameter values
701
- * @return this UriComponentsBuilder
702
- * @see #queryParam(String, Collection)
703
- */
704
625
@ Override
705
626
public UriComponentsBuilder queryParam (String name , Object ... values ) {
706
627
Assert .notNull (name , "Name must not be null" );
@@ -717,26 +638,13 @@ public UriComponentsBuilder queryParam(String name, Object... values) {
717
638
return this ;
718
639
}
719
640
720
- /**
721
- * Append the given query parameter to the existing query parameters. The
722
- * given name or any of the values may contain URI template variables. If no
723
- * values are given, the resulting URI will contain the query parameter name
724
- * only (i.e. {@code ?foo} instead of {@code ?foo=bar}).
725
- * @param name the query parameter name
726
- * @param values the query parameter values
727
- * @return this UriComponentsBuilder
728
- * @since 5.2
729
- * @see #queryParam(String, Object...)
730
- */
731
641
@ Override
732
642
public UriComponentsBuilder queryParam (String name , @ Nullable Collection <?> values ) {
733
643
return queryParam (name , values != null ? values .toArray () : EMPTY_VALUES );
734
644
}
735
645
736
646
/**
737
- * Add the given query parameters.
738
- * @param params the params
739
- * @return this UriComponentsBuilder
647
+ * {@inheritDoc}
740
648
* @since 4.0
741
649
*/
742
650
@ Override
@@ -747,14 +655,6 @@ public UriComponentsBuilder queryParams(@Nullable MultiValueMap<String, String>
747
655
return this ;
748
656
}
749
657
750
- /**
751
- * Set the query parameter values overriding all existing query values for
752
- * the same parameter. If no values are given, the query parameter is removed.
753
- * @param name the query parameter name
754
- * @param values the query parameter values
755
- * @return this UriComponentsBuilder
756
- * @see #replaceQueryParam(String, Collection)
757
- */
758
658
@ Override
759
659
public UriComponentsBuilder replaceQueryParam (String name , Object ... values ) {
760
660
Assert .notNull (name , "Name must not be null" );
@@ -766,24 +666,13 @@ public UriComponentsBuilder replaceQueryParam(String name, Object... values) {
766
666
return this ;
767
667
}
768
668
769
- /**
770
- * Set the query parameter values overriding all existing query values for
771
- * the same parameter. If no values are given, the query parameter is removed.
772
- * @param name the query parameter name
773
- * @param values the query parameter values
774
- * @return this UriComponentsBuilder
775
- * @see #replaceQueryParam(String, Object...)
776
- * @since 5.2
777
- */
778
669
@ Override
779
670
public UriComponentsBuilder replaceQueryParam (String name , @ Nullable Collection <?> values ) {
780
671
return replaceQueryParam (name , values != null ? values .toArray () : EMPTY_VALUES );
781
672
}
782
673
783
674
/**
784
- * Set the query parameter values overriding all existing query values.
785
- * @param params the query parameter name
786
- * @return this UriComponentsBuilder
675
+ * {@inheritDoc}
787
676
* @since 4.2
788
677
*/
789
678
@ Override
@@ -795,12 +684,6 @@ public UriComponentsBuilder replaceQueryParams(@Nullable MultiValueMap<String, S
795
684
return this ;
796
685
}
797
686
798
- /**
799
- * Set the URI fragment. The given fragment may contain URI template variables,
800
- * and may also be {@code null} to clear the fragment of this builder.
801
- * @param fragment the URI fragment
802
- * @return this UriComponentsBuilder
803
- */
804
687
@ Override
805
688
public UriComponentsBuilder fragment (@ Nullable String fragment ) {
806
689
if (fragment != null ) {
0 commit comments