@@ -125,6 +125,10 @@ public String getHash() {
125125 return ref == null ? "" : "#" + ref ;
126126 }
127127
128+ /**
129+ * Sets the {@code hash} property.
130+ * @param fragment the {@code hash} property
131+ */
128132 @ JsxSetter
129133 public void setHash (final String fragment ) throws MalformedURLException {
130134 if (url_ == null ) {
@@ -146,6 +150,10 @@ public String getHost() {
146150 return url_ .getHost () + (port > 0 ? ":" + port : "" );
147151 }
148152
153+ /**
154+ * Sets the {@code host} property.
155+ * @param host the {@code host} property
156+ */
149157 @ JsxSetter
150158 public void setHost (final String host ) throws MalformedURLException {
151159 if (url_ == null ) {
@@ -210,6 +218,10 @@ public String getHostname() {
210218 return UrlUtils .encodeAnchor (url_ .getHost ());
211219 }
212220
221+ /**
222+ * Sets the {@code hostname} property.
223+ * @param hostname the {@code hostname} property
224+ */
213225 @ JsxSetter
214226 public void setHostname (final String hostname ) throws MalformedURLException {
215227 if (getBrowserVersion ().hasFeature (JS_ANCHOR_HOSTNAME_IGNORE_BLANK )) {
@@ -234,6 +246,10 @@ public String getHref() {
234246 return jsToString ();
235247 }
236248
249+ /**
250+ * Sets the {@code href} property.
251+ * @param href the {@code href} property
252+ */
237253 @ JsxSetter
238254 public void setHref (final String href ) throws MalformedURLException {
239255 if (url_ == null ) {
@@ -289,6 +305,10 @@ public String getPassword() {
289305 return idx == -1 ? "" : userInfo .substring (idx + 1 );
290306 }
291307
308+ /**
309+ * Sets the {@code password} property.
310+ * @param password the {@code password} property
311+ */
292312 @ JsxSetter
293313 public void setPassword (final String password ) throws MalformedURLException {
294314 if (url_ == null ) {
@@ -311,6 +331,10 @@ public String getPathname() {
311331 return path .isEmpty () ? "/" : path ;
312332 }
313333
334+ /**
335+ * Sets the {@code path} property.
336+ * @param path the {@code path} property
337+ */
314338 @ JsxSetter
315339 public void setPathname (final String path ) throws MalformedURLException {
316340 if (url_ == null ) {
@@ -334,6 +358,10 @@ public String getPort() {
334358 return port == -1 ? "" : Integer .toString (port );
335359 }
336360
361+ /**
362+ * Sets the {@code port} property.
363+ * @param port the {@code port} property
364+ */
337365 @ JsxSetter
338366 public void setPort (final String port ) throws MalformedURLException {
339367 if (url_ == null ) {
@@ -356,6 +384,10 @@ public String getProtocol() {
356384 return protocol .isEmpty () ? "" : (protocol + ":" );
357385 }
358386
387+ /**
388+ * Sets the {@code protocol} property.
389+ * @param protocol the {@code protocol} property
390+ */
359391 @ JsxSetter
360392 public void setProtocol (final String protocol ) throws MalformedURLException {
361393 if (url_ == null || protocol .isEmpty ()) {
@@ -391,6 +423,10 @@ public String getSearch() {
391423 return search == null ? "" : "?" + search ;
392424 }
393425
426+ /**
427+ * Sets the {@code search} property.
428+ * @param search the {@code search} property
429+ */
394430 @ JsxSetter
395431 public void setSearch (final String search ) throws MalformedURLException {
396432 if (url_ == null ) {
@@ -416,6 +452,11 @@ public void setSearch(final String search) throws MalformedURLException {
416452 url_ = UrlUtils .getUrlWithNewQuery (url_ , query );
417453 }
418454
455+ /**
456+ * Sets the {@code search} property based on {@link NameValuePair}'s.
457+ * @param nameValuePairs the pairs
458+ * @throws MalformedURLException in case of error
459+ */
419460 public void setSearch (final List <NameValuePair > nameValuePairs ) throws MalformedURLException {
420461 final StringBuilder newSearch = new StringBuilder ();
421462 for (final NameValuePair nameValuePair : nameValuePairs ) {
@@ -448,6 +489,10 @@ public String getUsername() {
448489 return StringUtils .substringBefore (userInfo , ':' );
449490 }
450491
492+ /**
493+ * Sets the {@code username} property.
494+ * @param username the {@code username} property
495+ */
451496 @ JsxSetter
452497 public void setUsername (final String username ) throws MalformedURLException {
453498 if (url_ == null ) {
0 commit comments