Skip to content

Commit

Permalink
docs: Improve inline documentation of ContributionType class (#500)
Browse files Browse the repository at this point in the history
* api fix javadoc for OSMContribution.is()
* fix grammar and typos in OSMContribution javadoc
  • Loading branch information
SlowMo24 authored and ConstantinNicolai committed Oct 11, 2023
1 parent e72a44d commit febfe48
Showing 1 changed file with 12 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,26 +86,20 @@ public interface OSMContribution extends OSHDBMapReducible, Comparable<OSMContri
* Checks if this contribution is of the given contribution type.
*
* <p>
* It can be one or more of:
* </p>
* <ul>
* <li>CREATION</li>
* <li>DELETION</li>
* <li>TAG_CHANGE</li>
* <li>GEOMETRY_CHANGE</li>
* </ul>
*
* <p>
* If this is a entity creation or deletion, the other flags are not set (even though one might
* argue that a just created object clearly has a different geometry than before, for example).
* </p>
*
* @return a set of modification type this contribution made on the underlying data
* I.e. checks if the given contribution type is in the
* {@code EnumSet<ContributionType>} returned by
* {@link #getContributionTypes() getContributionTypes}. This method is
* preferred to {@code getContributionTypes().contains(ContributionType)}
* because the class uses lazy evaluation and the computation of a
* {@link ContributionType.GEOMETRY_CHANGE} can be computation intensive.
*
* @param contributionType the ContributionType to check
* @return true if this contribution does the respective change, false otherwise
*/
boolean is(ContributionType contributionType);

/**
* Determined the type of modification this contribution has made.
* Determines the type of modification this contribution has made.
*
* <p>
* Can be one or more of:
Expand All @@ -118,11 +112,11 @@ public interface OSMContribution extends OSHDBMapReducible, Comparable<OSMContri
* </ul>
*
* <p>
* If this is a entity creation or deletion, the other flags are not set (even though one might
* If this is an entity creation or deletion, the other flags are not set (even though one might
* argue that a just created object clearly has a different geometry than before, for example).
* </p>
*
* @return a set of modification type this contribution made on the underlying data
* @return a set of modification types this contribution made on the underlying data
*/
EnumSet<ContributionType> getContributionTypes();

Expand Down

0 comments on commit febfe48

Please sign in to comment.