Skip to content

Commit 380e5c3

Browse files
author
Tyler Coles
committed
Resolved Javadoc errors and warnings.
1 parent 031a3bb commit 380e5c3

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

src/main/java/com/javadocmd/simplelatlng/Geohasher.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ public class Geohasher {
3535

3636
/**
3737
* <p>Number of hash characters supported.</p>
38-
* <p>Translates to binary bits per value by the formula:<br/>
39-
* BITS = ((PRECISION * 5) / 2) + PRECISION % 2.</p>
38+
* <p>Translates to binary bits per value by the formula:</p>
39+
* <pre>BITS = ((PRECISION * 5) / 2) + PRECISION % 2.</pre>
4040
* <p>BITS in turn translates to numerical precision
41-
* by the formula:<br/>
42-
* LATITUDE_ERROR = 90.0 / (2 ^ (BITS + 1))<br/>
43-
* LONGITUDE_ERROR = 180.0 / (2 ^ (BITS + 1))</p>
41+
* by the formula:</p>
42+
* <pre>LATITUDE_ERROR = 90.0 / (2 ^ (BITS + 1))
43+
*LONGITUDE_ERROR = 180.0 / (2 ^ (BITS + 1))</pre>
4444
*/
4545
public static final int PRECISION = 12;
4646
private static final int BITS = ((PRECISION * 5) / 2) + PRECISION % 2;
@@ -88,7 +88,10 @@ public static LatLng decode(String hash) {
8888
}
8989

9090
/**
91-
* Converts a hash string into a string of bits.
91+
* Converts a hash string into a series of bits.
92+
*
93+
* @param hash the geohash string.
94+
* @return the bits in the geohash.
9295
*/
9396
protected static BitSet hashToBits(String hash) {
9497
try {

src/main/java/com/javadocmd/simplelatlng/LatLng.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public class LatLng implements Serializable {
3737

3838
/**
3939
* Creates a random latitude and longitude. (Not inclusive of (-90, 0))
40+
*
41+
* @return the random LatLng.
4042
*/
4143
public static LatLng random() {
4244
return random(new Random());
@@ -47,6 +49,7 @@ public static LatLng random() {
4749
*
4850
* @param r the random number generator to use, if you want to be
4951
* specific or are creating many LatLngs at once.
52+
* @return the random LatLng.
5053
*/
5154
public static LatLng random(Random r) {
5255
return new LatLng((r.nextDouble() * -180.0) + 90.0,
@@ -159,7 +162,7 @@ private void setLongitude(double longitude) {
159162
}
160163

161164
/**
162-
* Returns true if this LatLng represents a polar coordinate (+/- 90 degrees latitude).
165+
* @return true if this LatLng represents a polar coordinate (+/- 90 degrees latitude).
163166
*/
164167
public boolean isPolar() {
165168
return this.latitude == 90000000L || this.latitude == -90000000L;

src/main/java/com/javadocmd/simplelatlng/LatLngTool.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ public static double distance(LatLng point1, LatLng point2, LengthUnit unit) {
8383
* to get the length of the arc.
8484
* </p>
8585
*
86+
* @param point1
87+
* the first point.
88+
* @param point2
89+
* the second point.
8690
* @return the internal angle for the arc connecting the two points in
8791
* radians.
8892
*/

src/main/java/com/javadocmd/simplelatlng/window/FilterHelper.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
import com.javadocmd.simplelatlng.LatLng;
1919

2020
/**
21-
* An abstract class to help LatLngWindows with the task of
21+
* <p>An abstract class to help LatLngWindows with the task of
2222
* filtering collections based on whether or not a point
2323
* is contained within the window. Rather than only filter
2424
* collections of LatLng, this helper enables you to filter
2525
* any class that has a LatLng value or for which a LatLng
26-
* value can be computed.<br/><br/>
27-
* An example of how you would instantiate a helper for
28-
* filtering on a collection of type MyObject:<br/>
26+
* value can be computed.</p>
27+
* <p>An example of how you would instantiate a helper for
28+
* filtering on a collection of type MyObject:</p>
2929
* <pre>FilterHelper&lt;MyObject&gt; helper = new FilterHelper&lt;MyObject&gt;() {
3030
* &#64;Override
3131
* public LatLng getLatLng(MyObject object) {
@@ -40,8 +40,8 @@
4040
public abstract class FilterHelper<S> {
4141

4242
/**
43-
* Returns <code>object</code>'s <code>LatLng</code>
44-
* value to be filtered.
43+
* @param object the object being filtered.
44+
* @return the <code>LatLng</code> value to use in the filter.
4545
*/
4646
public abstract LatLng getLatLng(S object);
4747
}

0 commit comments

Comments
 (0)