Changeset 18193 in josm for trunk/src/org


Ignore:
Timestamp:
2021-09-03T03:12:33+02:00 (3 years ago)
Author:
Don-vip
Message:

fix javadoc warnings

Location:
trunk/src/org/openstreetmap/josm
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java

    r18116 r18193  
    780780    /**
    781781     * Gets a unique toolbar key to store this layer as toolbar item
    782      * @return The kay.
     782     * @return The key.
    783783     */
    784784    public String getToolbarName() {
  • trunk/src/org/openstreetmap/josm/data/osm/event/IDataSelectionListener.java

    r17867 r18193  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.osm.event;
     3
     4import java.util.Collections;
     5import java.util.HashSet;
     6import java.util.LinkedHashSet;
     7import java.util.Set;
     8import java.util.stream.Collectors;
     9import java.util.stream.Stream;
    310
    411import org.openstreetmap.josm.data.osm.DataSelectionListener;
     
    1017import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1118import org.openstreetmap.josm.tools.CheckParameterUtil;
    12 
    13 import java.util.Collections;
    14 import java.util.HashSet;
    15 import java.util.LinkedHashSet;
    16 import java.util.Set;
    17 import java.util.stream.Collectors;
    18 import java.util.stream.Stream;
    1919
    2020/**
     
    266266
    267267        /**
    268          * Create a {@link DataSelectionListener.SelectionRemoveEvent}
     268         * Create a {@code SelectionRemoveEvent}
    269269         * @param source The source dataset
    270270         * @param old The old primitives that were previously selected. The caller needs to ensure that this set is not modified.
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerRule.java

    r17642 r18193  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.validation.tests;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
     5
     6import java.awt.geom.Area;
     7import java.io.Reader;
     8import java.io.StringReader;
     9import java.util.ArrayList;
     10import java.util.Collection;
     11import java.util.HashMap;
     12import java.util.HashSet;
     13import java.util.List;
     14import java.util.Map;
     15import java.util.Objects;
     16import java.util.Optional;
     17import java.util.Set;
     18import java.util.function.Predicate;
     19import java.util.regex.Matcher;
     20import java.util.regex.Pattern;
     21import java.util.stream.Collectors;
    322
    423import org.openstreetmap.josm.command.Command;
     
    2948import org.openstreetmap.josm.tools.Logging;
    3049import org.openstreetmap.josm.tools.Utils;
    31 
    32 import java.awt.geom.Area;
    33 import java.io.Reader;
    34 import java.io.StringReader;
    35 import java.util.ArrayList;
    36 import java.util.Collection;
    37 import java.util.HashMap;
    38 import java.util.HashSet;
    39 import java.util.List;
    40 import java.util.Map;
    41 import java.util.Objects;
    42 import java.util.Optional;
    43 import java.util.Set;
    44 import java.util.function.Predicate;
    45 import java.util.regex.Matcher;
    46 import java.util.regex.Pattern;
    47 import java.util.stream.Collectors;
    48 
    49 import static org.openstreetmap.josm.tools.I18n.tr;
    5050
    5151/**
     
    227227    /**
    228228     * Determines the {@code index}-th key/value/tag (depending on {@code type}) of the
    229      * {@link Selector.GeneralSelector}.
     229     * {@link org.openstreetmap.josm.gui.mappaint.mapcss.Selector.GeneralSelector}.
    230230     *
    231231     * @param matchingSelector matching selector
  • trunk/src/org/openstreetmap/josm/data/vector/DataStore.java

    r17867 r18193  
    2525 * A class that stores data (essentially a simple {@link DataSet})
    2626 * @author Taylor Smock
     27 * @param <O> Type of OSM primitive
     28 * @param <N> Type of node
     29 * @param <W> Type of way
     30 * @param <R> Type of relation
    2731 * @since 17862
    2832 */
  • trunk/src/org/openstreetmap/josm/data/vector/VectorDataSet.java

    r18052 r18193  
    3636import org.openstreetmap.josm.data.osm.event.IDataSelectionEventSource;
    3737import org.openstreetmap.josm.data.osm.event.IDataSelectionListener;
     38import org.openstreetmap.josm.data.osm.event.IDataSelectionListener.SelectionAddEvent;
     39import org.openstreetmap.josm.data.osm.event.IDataSelectionListener.SelectionChangeEvent;
     40import org.openstreetmap.josm.data.osm.event.IDataSelectionListener.SelectionRemoveEvent;
     41import org.openstreetmap.josm.data.osm.event.IDataSelectionListener.SelectionReplaceEvent;
     42import org.openstreetmap.josm.data.osm.event.IDataSelectionListener.SelectionToggleEvent;
    3843import org.openstreetmap.josm.gui.mappaint.ElemStyles;
    3944import org.openstreetmap.josm.tools.ListenerList;
     
    296301
    297302    /**
    298      * Get the current Read/Write lock
    299      * @implNote This changes based off of zoom level. Please do not use this in a finally block
     303     * Get the current Read/Write lock.
     304     * This changes based off of zoom level. Please do not use this in a finally block
    300305     * @return The current read/write lock
    301306     */
     
    328333
    329334    /**
    330      * Mark some primitives as highlighted
     335     * Mark some primitives as highlighted.
     336     * API is *highly likely* to change, as the inherited methods are modified to accept primitives other than OSM primitives.
    331337     * @param primitives The primitives to highlight
    332      * @apiNote This is *highly likely* to change, as the inherited methods are modified to accept primitives other than OSM primitives.
    333338     */
    334339    public void setHighlighted(Collection<PrimitiveId> primitives) {
     
    423428
    424429    private void toggleSelectedImpl(Stream<? extends PrimitiveId> osm) {
    425         this.doSelectionChange(old -> new IDataSelectionListener.SelectionToggleEvent<>(this, old,
     430        this.doSelectionChange(old -> new SelectionToggleEvent<>(this, old,
    426431                osm.flatMap(this::getPrimitivesById).filter(Objects::nonNull)));
    427432    }
     
    438443
    439444    private void setSelectedImpl(Stream<? extends PrimitiveId> osm) {
    440         this.doSelectionChange(old -> new IDataSelectionListener.SelectionReplaceEvent<>(this, old,
     445        this.doSelectionChange(old -> new SelectionReplaceEvent<>(this, old,
    441446                osm.filter(Objects::nonNull).flatMap(this::getPrimitivesById).filter(Objects::nonNull)));
    442447    }
     
    453458
    454459    private void addSelectedImpl(Stream<? extends PrimitiveId> osm) {
    455         this.doSelectionChange(old -> new IDataSelectionListener.SelectionAddEvent<>(this, old,
     460        this.doSelectionChange(old -> new SelectionAddEvent<>(this, old,
    456461                osm.flatMap(this::getPrimitivesById).filter(Objects::nonNull)));
    457462    }
     
    473478
    474479    private void clearSelectionImpl(Stream<? extends PrimitiveId> osm) {
    475         this.doSelectionChange(old -> new IDataSelectionListener.SelectionRemoveEvent<>(this, old,
     480        this.doSelectionChange(old -> new SelectionRemoveEvent<>(this, old,
    476481                osm.flatMap(this::getPrimitivesById).filter(Objects::nonNull)));
    477482    }
     
    481486     * <p>
    482487     * This is the only method that changes the current selection state.
    483      * @param command A generator that generates the {@link DataSelectionListener.SelectionChangeEvent}
     488     * @param command A generator that generates the {@link SelectionChangeEvent}
    484489     *                for the given base set of currently selected primitives.
    485490     * @return true iff the command did change the selection.
    486491     */
    487492    private boolean doSelectionChange(final Function<Set<VectorPrimitive>,
    488             IDataSelectionListener.SelectionChangeEvent<VectorPrimitive, VectorNode, VectorWay, VectorRelation, VectorDataSet>> command) {
     493            SelectionChangeEvent<VectorPrimitive, VectorNode, VectorWay, VectorRelation, VectorDataSet>> command) {
    489494        synchronized (this.selectionLock) {
    490             IDataSelectionListener.SelectionChangeEvent<VectorPrimitive, VectorNode, VectorWay, VectorRelation, VectorDataSet> event =
     495            SelectionChangeEvent<VectorPrimitive, VectorNode, VectorWay, VectorRelation, VectorDataSet> event =
    491496                    command.apply(currentSelectedPrimitives.stream().map(this::getPrimitiveById).collect(Collectors.toSet()));
    492497            if (event.isNop()) {
     
    570575     * Try to read something (here to avoid boilerplate)
    571576     *
     577     * @param lock     The lock
    572578     * @param supplier The reading function
    573579     * @param <T>      The return type
     
    589595    /**
    590596     * Try to write something (here to avoid boilerplate)
    591      *
     597     * @param lock lock
    592598     * @param runnable The writing function
    593599     */
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompComboBox.java

    r18192 r18193  
    221221     * @deprecated Has been moved to the model, where it belongs. Use
    222222     *     {@link org.openstreetmap.josm.gui.widgets.HistoryComboBoxModel#addAllStrings} instead. Probably you want to use
    223      *     {@link org.openstreetmap.josm.gui.widgets.HistoryComboBoxModel.Preferences#load} and
    224      *     {@link org.openstreetmap.josm.gui.widgets.HistoryComboBoxModel.Preferences#save}.
     223     *     {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#load} and
     224     *     {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#save}.
    225225     */
    226226    @Deprecated
     
    239239     * @deprecated Has been moved to the model, where it belongs. Use
    240240     *     {@link org.openstreetmap.josm.gui.widgets.HistoryComboBoxModel#addAllStrings} instead. Probably you want to use
    241      *     {@link org.openstreetmap.josm.gui.widgets.HistoryComboBoxModel.Preferences#load} and
    242      *     {@link org.openstreetmap.josm.gui.widgets.HistoryComboBoxModel.Preferences#save}.
     241     *     {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#load} and
     242     *     {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#save}.
    243243     */
    244244    @Deprecated
  • trunk/src/org/openstreetmap/josm/gui/widgets/HistoryComboBox.java

    r18173 r18193  
    3939     * @return the items as strings
    4040     * @deprecated Has been moved to the model, where it belongs. Use
    41      *     {@link HistoryComboBoxModel#asStringList} instead.  Probably you want to use
    42      *     {@link HistoryComboBoxModel.Preferences#load} and
    43      *     {@link HistoryComboBoxModel.Preferences#save}.
     41     *     {@link HistoryComboBoxModel#asStringList} instead. Probably you want to use
     42     *     {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#load} and
     43     *     {@link org.openstreetmap.josm.gui.tagging.ac.AutoCompComboBoxModel.Preferences#save}.
    4444     */
    4545    @Deprecated
Note: See TracChangeset for help on using the changeset viewer.