Ignore:
Timestamp:
2024-08-21T22:51:45+02:00 (5 months ago)
Author:
taylor.smock
Message:

Use API types (HashSet -> Set for private methods)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reverter/src/reverter/ChangesetReverter.java

    r36318 r36320  
    1616import java.util.Objects;
    1717import java.util.Optional;
     18import java.util.Set;
    1819import java.util.stream.Collectors;
    1920
     
    474475     * @param toDelete The primitives that will be deleted
    475476     */
    476     private void checkObjectVersions(List<Command> cmds, HashSet<OsmPrimitive> conflicted, HashSet<OsmPrimitive> toDelete) {
     477    private void checkObjectVersions(List<Command> cmds, Set<OsmPrimitive> conflicted, Set<OsmPrimitive> toDelete) {
    477478        for (Iterator<ChangesetDataSetEntry> it = cds.iterator(); it.hasNext();) {
    478479            ChangesetDataSetEntry entry = it.next();
     
    518519     * @return {@code true} if the objects are not semantically the same
    519520     */
    520     private boolean checkObjectVersionsNotSemanticallySame(HashSet<OsmPrimitive> toDelete, HistoryOsmPrimitive hp, OsmPrimitive dp) {
     521    private boolean checkObjectVersionsNotSemanticallySame(Set<OsmPrimitive> toDelete, HistoryOsmPrimitive hp, OsmPrimitive dp) {
    521522        return hp.getVersion() != dp.getVersion()
    522523                && (hp.isVisible() || dp.isVisible()) &&
     
    535536     * @param toDelete The primitives that will be deleted
    536537     */
    537     private void checkForDeletedReferrers(List<Command> cmds, HashSet<OsmPrimitive> conflicted, HashSet<OsmPrimitive> toDelete) {
     538    private void checkForDeletedReferrers(List<Command> cmds, Set<OsmPrimitive> conflicted, Set<OsmPrimitive> toDelete) {
    538539        List<OsmPrimitive> delSorted = toDelete.stream()
    539540                .filter(p -> !p.isDeleted())
     
    565566     * @return {@code true} if we need to restart processing
    566567     */
    567     private boolean checkForDeletedReferrersPrimitive(List<Command> cmds, HashSet<OsmPrimitive> conflicted,
    568                                                       HashSet<OsmPrimitive> toDelete, List<OsmPrimitive> delSorted,
     568    private boolean checkForDeletedReferrersPrimitive(List<Command> cmds, Set<OsmPrimitive> conflicted,
     569                                                      Set<OsmPrimitive> toDelete, List<OsmPrimitive> delSorted,
    569570                                                      OsmPrimitive p, int i) {
    570571        for (OsmPrimitive referrer : p.getReferrers()) {
Note: See TracChangeset for help on using the changeset viewer.