|
| 1 | +/* |
| 2 | + * Copyright 2013 <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a> |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
1 | 16 | package org.ocpsoft.urlbuilder; |
2 | 17 |
|
| 18 | +/** |
| 19 | + * Represents a valid web address, or valid web address fragment. |
| 20 | + * |
| 21 | + * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a> |
| 22 | + */ |
3 | 23 | public interface Address |
4 | 24 | { |
| 25 | + /** |
| 26 | + * Return the anchor '#' section of the {@link Address}, or <code>null</code> if no anchor is set. |
| 27 | + */ |
5 | 28 | String getAnchor(); |
6 | 29 |
|
| 30 | + /** |
| 31 | + * Return <code>true</code> if the {@link Address} contains an anchor '#' section, otherwise return |
| 32 | + * <code>false</code>. |
| 33 | + */ |
7 | 34 | boolean isAnchorSet(); |
8 | 35 |
|
| 36 | + /** |
| 37 | + * Get the path section of this {@link Address}, or <code>null</code> if no path is set. |
| 38 | + */ |
9 | 39 | String getPath(); |
10 | 40 |
|
| 41 | + /** |
| 42 | + * Get the path and query sections of this {@link Address}, or <code>null</code> if neither are set. |
| 43 | + */ |
11 | 44 | String getPathAndQuery(); |
12 | 45 |
|
| 46 | + /** |
| 47 | + * Return <code>true</code> if this {@link Address} contains a path section, otherwise return <code>false</code>. |
| 48 | + */ |
13 | 49 | boolean isPathSet(); |
14 | 50 |
|
| 51 | + /** |
| 52 | + * Get the port of this {@link Address}, or <code>null</code> if no port is set. |
| 53 | + */ |
15 | 54 | Integer getPort(); |
16 | 55 |
|
| 56 | + /** |
| 57 | + * Return <code>true</code> if a port is set in {@link Address}, otherwise return <code>false</code>. |
| 58 | + */ |
17 | 59 | boolean isPortSet(); |
18 | 60 |
|
| 61 | + /** |
| 62 | + * Get the domain section of this {@link Address}, or <code>null</code> if no domain is set. |
| 63 | + */ |
19 | 64 | String getHost(); |
20 | 65 |
|
| 66 | + /** |
| 67 | + * Return <code>true</code> if this {@link Address} has a host section, otherwise return <code>false</code>. |
| 68 | + */ |
21 | 69 | boolean isHostSet(); |
22 | 70 |
|
| 71 | + /** |
| 72 | + * Get the protocol section of this {@link Address}, or null if no protocol is set. |
| 73 | + */ |
23 | 74 | String getProtocol(); |
24 | 75 |
|
| 76 | + /** |
| 77 | + * Return <code>true</code> if this {@link Address} has a protocol section, otherwise return <code>false</code>. |
| 78 | + */ |
25 | 79 | boolean isProtocolSet(); |
26 | 80 |
|
| 81 | + /** |
| 82 | + * Get the query section of this {@link Address}, or <code>null</code> if no query is set. |
| 83 | + */ |
27 | 84 | String getQuery(); |
28 | 85 |
|
| 86 | + /** |
| 87 | + * Return <code>true</code> if this {@link Address} contains a query section, otherwise return <code>false</code>. |
| 88 | + */ |
29 | 89 | boolean isQuerySet(); |
30 | 90 | } |
0 commit comments