Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve inline documentation of ContributionType class #500

Merged
merged 3 commits into from
Apr 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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