@@ -17,7 +17,7 @@ public class AddressBuilder implements Address
1717 private volatile CharSequence path ;
1818 private Map <CharSequence , List <Object >> parameters = new LinkedHashMap <CharSequence , List <Object >>();
1919 private Map <CharSequence , List <Object >> queries = new LinkedHashMap <CharSequence , List <Object >>();
20- private String anchor ;
20+ private CharSequence anchor ;
2121
2222 private AddressBuilder ()
2323 {}
@@ -32,46 +32,45 @@ public Address build()
3232 return this ;
3333 }
3434
35- public AddressBuilder protocol (String protocol )
35+ public AddressBuilderProtocol protocol (CharSequence protocol )
3636 {
3737 this .protocol = protocol ;
38- return this ;
38+ return new AddressBuilderProtocol ( this ) ;
3939 }
4040
41- public AddressBuilder host (CharSequence host )
41+ public AddressBuilderHost host (CharSequence host )
4242 {
4343 this .host = host ;
44- return this ;
44+ return new AddressBuilderHost ( this ) ;
4545 }
4646
47- public AddressBuilder port (int port )
47+ public AddressBuilderPort port (int port )
4848 {
4949 this .port = port ;
50- return this ;
50+ return new AddressBuilderPort ( this ) ;
5151 }
5252
53- public AddressBuilder path (CharSequence path )
53+ public AddressBuilderPath path (CharSequence path )
5454 {
5555 this .path = path ;
56- return this ;
56+ return new AddressBuilderPath ( this ) ;
5757 }
5858
59- public AddressBuilder query (CharSequence name , Object ... values )
59+ public AddressBuilderQuery query (CharSequence name , Object ... values )
6060 {
6161 this .queries .put (name .toString (), Arrays .asList (values ));
62- return this ;
62+ return new AddressBuilderQuery ( this ) ;
6363 }
6464
65- public AddressBuilder anchor (String anchor )
65+ public AddressBuilderAnchor anchor (CharSequence anchor )
6666 {
6767 this .anchor = anchor ;
68- return this ;
68+ return new AddressBuilderAnchor ( this ) ;
6969 }
7070
71- public AddressBuilder set (CharSequence name , Object ... values )
71+ void set (CharSequence name , Object ... values )
7272 {
7373 this .parameters .put (name .toString (), Arrays .asList (values ));
74- return this ;
7574 }
7675
7776 @ Override
0 commit comments