Skip to content

Commit

Permalink
javadoc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurtis LoVerde committed Mar 4, 2016
1 parent 2b51c06 commit de1fd92
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Release 2.0.1 (March 4, 2016)

* Some javadoc fixes


## Release 2.0 (March 2, 2016)

* The Latitude, Longitude and Point classes have always implemented hashCode(), so as to allow their use in HashMaps. Despite this, the classes were mutable, which, as you might know, is incorrect. Given the choice of either making the classes immutable or taking away hashCode(), it was decided to make them immutable. *If you are on a previous release and are currently using setters, you will need to refactor your code.*
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildScriptsDir=../BuildScripts
# BuildScripts configuration

projectName=GeographicCoordinate
releaseVersion=2.0
releaseVersion=2.0.1
specVersion=2.0
javaSourceCompatibility=1.6
javaTargetCompatibility=1.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public enum Unit {
* <p>
* For those of you living in the U.S., the U.S. Survey Foot is NOT the foot
* you think of when you think of feet. That is the
* {@link Unit#INTERNATIONAL_FEET international foot}. The survey foot is
* {@link Unit#FEET international foot}. The survey foot is
* used in geodetic surveys. As defined by the National Bureau of Standards
* in 1959:
* </p>
Expand Down Expand Up @@ -117,7 +117,7 @@ private Unit( final double perKilometer ) {
* Gets the total distance between an unlimited number of {@linkplain Point}s. For example, if the
* distance from point A to point B is 3, and the distance from point B to point C is 2, the total
* distance traveled will be (3 + 2) = 5. Just pass {@code Point}s in the order in which they're
* visited. This is equivalent to repeatedly calling {@link DistanceCalculator#distance(Latitude, Longitude, Latitude, Longitude, Unit)}.
* visited. This is equivalent to repeatedly calling {@link DistanceCalculator#distance(Unit, Latitude, Longitude, Latitude, Longitude)}.
* </p>
*
* <p><strong>
Expand Down Expand Up @@ -160,7 +160,7 @@ public static double distance( final Unit unit, final Point ... points ) {
/**
* <p>
* Gets the distance between two sets of coordinates. Functionally equivalent to
* {@linkplain DistanceCalculator#distance(Unit, Point ...)}
* {@linkplain DistanceCalculator#distance(Unit, Point...)}
* <p>
*
* <p><strong>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/loverde/geographiccoordinate/Latitude.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ public Latitude( final int degrees, final int minutes, final double seconds, fin
/**
* @param direction - A member of {@linkplain Latitude.Direction}
*
* @throws GeographicCoordinateException In the following situations:
* @throws IllegalArgumentException In the following situations:
* <ul>
* <li>{@code direction} is null</li>
* <li>{@code direction} is {@linkplain Direction#NORTH} or {@linkplain Direction#SOUTH}, but the latitude is not exactly 0.0</li>
* <li>{@code direction} is {@linkplain Direction#NEITHER} but the latitude is not 0.0
* </ul>
*/
private void setDirection( final Latitude.Direction direction ) {
if( direction == null ) throw new IllegalArgumentException( GeographicCoordinateException.Messages.DIRECTION_NULL );

if( direction == Direction.NEITHER && !(getDegrees() == 0 && getMinutes() == 0 && getSeconds() == 0.0d) ) throw new GeographicCoordinateException( GeographicCoordinateException.Messages.DIRECTION_INVALID );
if( direction == Direction.NEITHER && !(getDegrees() == 0 && getMinutes() == 0 && getSeconds() == 0.0d) ) throw new IllegalArgumentException( GeographicCoordinateException.Messages.DIRECTION_INVALID );

this.direction = direction;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/loverde/geographiccoordinate/Longitude.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ public Longitude( final int degrees, final int minutes, final double seconds, fi
/**
* @param direction - A member of {@code Longitude.Direction}
*
* @throws GeographicCoordinateException In the following situations:
* @throws IllegalArgumentException In the following situations:
* <ul>
* <li>{@code direction} is null</li>
* <li>{@code direction} is {@linkplain Direction#NORTH} or {@linkplain Direction#SOUTH}, but the latitude is not exactly 0.0</li>
* <li>{@code direction} is {@linkplain Direction#NEITHER} but the latitude is not 0.0
* </ul>
*/
private void setDirection( final Longitude.Direction direction ) {
Expand Down

0 comments on commit de1fd92

Please sign in to comment.