Changeset 8926 in josm for trunk/src/org


Ignore:
Timestamp:
2015-10-22T02:01:00+02:00 (4 years ago)
Author:
Don-vip
Message:

javadoc fixes

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/DownloadAlongAction.java

    r8509 r8926  
    1010import java.util.Collection;
    1111import java.util.List;
     12import java.util.concurrent.CancellationException;
     13import java.util.concurrent.ExecutionException;
    1214import java.util.concurrent.Future;
    1315
     
    9193     * This functions calculates the rectangles, asks the user to continue and downloads
    9294     * the areas if applicable.
     95     *
     96     * @param a download area hull
     97     * @param maxArea maximum area size for a single download
     98     * @param osmDownload Set to true if OSM data should be downloaded
     99     * @param gpxDownload Set to true if GPX data should be downloaded
     100     * @param title the title string for the confirmation dialog
     101     * @param progressMonitor the progress monitor
    93102     */
    94103    protected static void confirmAndDownloadAreas(Area a, double maxArea, boolean osmDownload, boolean gpxDownload, String title,
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r8919 r8926  
    930930
    931931    /**
    932      * This is a method splits way into smaller parts, using the prepared nodes list as split points.
     932     * This is a method that splits way into smaller parts, using the prepared nodes list as split points.
    933933     * Uses {@link SplitWayAction#splitWay} for the heavy lifting.
     934     * @param way way to split
     935     * @param nodes split points
    934936     * @return list of split ways (or original ways if no splitting is done).
    935937     */
     
    11421144     * This method checks if polygons have several touching parts and splits them in several polygons.
    11431145     * @param polygons the polygons to process.
     1146     * @return the resulting list of polygons
    11441147     */
    11451148    public static List<AssembledPolygon> fixTouchingPolygons(List<AssembledPolygon> polygons) {
  • trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java

    r8855 r8926  
    245245     *      - The same for vertical segments.
    246246     *  5. Rotate back.
    247      *
     247     * @throws InvalidUserInputException if selected ways have an angle different from 90 or 180 degrees
    248248     **/
    249249    private static Collection<Command> orthogonalize(List<WayData> wayDataList, List<Node> headingNodes) throws InvalidUserInputException {
     
    536536     * Recognize angle to be approximately 0, 90, 180 or 270 degrees.
    537537     * returns an integral value, corresponding to a counter clockwise turn:
     538     * @throws RejectedAngleException in case of invalid angle
    538539     */
    539540    private static int angleToDirectionChange(double a, double deltaMax) throws RejectedAngleException {
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r8924 r8926  
    837837    /**
    838838     * Called after every put. In case of a problem, do nothing but output the error in log.
     839     * @throws IOException if any I/O error occurs
    839840     */
    840841    public void save() throws IOException {
  • trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java

    r8836 r8926  
    113113     *
    114114     * @return the option selected by user. {@link JOptionPane#CLOSED_OPTION} if the dialog was closed.
     115     * @throws HeadlessException if <code>GraphicsEnvironment.isHeadless</code> returns <code>true</code>
    115116     */
    116117    public static int showOptionDialog(String preferenceKey, Component parent, Object message, String title, int optionType,
     
    153154     *
    154155     * @return true, if the selected option is equal to <code>trueOption</code>, otherwise false.
     156     * @throws HeadlessException if <code>GraphicsEnvironment.isHeadless</code> returns <code>true</code>
    155157     *
    156158     * @see JOptionPane#INFORMATION_MESSAGE
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java

    r8863 r8926  
    198198    /**
    199199     * Called from the XML parser to set the types this preset affects.
     200     * @throws SAXException if any SAX error occurs
    200201     */
    201202    public void setType(String types) throws SAXException {
  • trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java

    r8846 r8926  
    128128    /**
    129129     * Parse the given input source and return the dataset.
     130     * @throws IllegalDataException if an error was found while parsing the OSM data
    130131     *
    131132     * @see OsmReader#parseDataSet(InputStream, ProgressMonitor)
  • trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java

    r8840 r8926  
    6060     * executed in the current thread.
    6161     * @return the data to cache
     62     * @throws T a {@link Throwable}
    6263     */
    6364    protected abstract byte[] updateData() throws T;
     
    175176    /**
    176177     * Tries to load the data using the given ident from disk. If this fails, data will be updated, unless run in offline mode
     178     * @throws T a {@link Throwable}
    177179     */
    178180    private void loadFromDisk() throws T {
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r8846 r8926  
    877877    }
    878878
    879     /** Method for parsing API responses for operations on individual notes */
     879    /**
     880     * Method for parsing API responses for operations on individual notes
     881     * @param xml the API response as XML data
     882     * @return the resulting Note
     883     * @throws OsmTransferException if the API response cannot be parsed
     884     */
    880885    private Note parseSingleNote(String xml) throws OsmTransferException {
    881886        try {
  • trunk/src/org/openstreetmap/josm/io/OsmImporter.java

    r8855 r8926  
    8484     * @param associatedFile filename of data (layer name will be generated from name of file)
    8585     * @param pm handler for progress monitoring and canceling
     86     * @throws IllegalDataException if an error was found while parsing the OSM data
    8687     */
    8788    protected void importData(InputStream in, final File associatedFile, ProgressMonitor pm) throws IllegalDataException {
     
    112113     * @param layerName name of generated layer
    113114     * @param progressMonitor handler for progress monitoring and canceling
     115     * @throws IllegalDataException if an error was found while parsing the OSM data
    114116     */
    115117    public OsmImporterData loadLayer(InputStream in, final File associatedFile, final String layerName, ProgressMonitor progressMonitor)
  • trunk/src/org/openstreetmap/josm/io/OsmReader.java

    r8846 r8926  
    398398     * This is basically the same code as parseUnknown(), except for the warnings, which
    399399     * are displayed for inner elements and not at top level.
     400     * @throws XMLStreamException if there is an error processing the underlying XML source
    400401     */
    401402    private void jumpToEnd(boolean printWarning) throws XMLStreamException {
     
    430431    /**
    431432     * Read out the common attributes and put them into current OsmPrimitive.
     433     * @throws XMLStreamException if there is an error processing the underlying XML source
    432434     */
    433435    private void readCommon(PrimitiveData current) throws XMLStreamException {
  • trunk/src/org/openstreetmap/josm/io/UTFInputStreamReader.java

    r8510 r8926  
    1616     * Creates a new {@link InputStreamReader} from the {@link InputStream} with UTF-8 as default encoding.
    1717     * @return A reader with the correct encoding. Starts to read after the BOM.
     18     * @throws IOException if any I/O error occurs
    1819     * @see #create(java.io.InputStream, String)
    1920     */
     
    2627     * @param defaultEncoding Used, when no BOM was recognized. Can be null.
    2728     * @return A reader with the correct encoding. Starts to read after the BOM.
     29     * @throws IOException if any I/O error occurs
    2830     */
    2931    public static UTFInputStreamReader create(InputStream input, String defaultEncoding) throws IOException {
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java

    r8840 r8926  
    134134     * @param algorithm the signing algorithm, eg "SHA256withRSA"
    135135     * @param san SubjectAlternativeName extension (optional)
     136     * @return the self-signed X.509 Certificate
     137     * @throws GeneralSecurityException if any security error occurs
     138     * @throws IOException if any I/O error occurs
    136139     */
    137140    private static X509Certificate generateCertificate(String dn, KeyPair pair, int days, String algorithm, String san)
    138141            throws GeneralSecurityException, IOException {
    139         PrivateKey privkey = pair.getPrivate();
    140142        X509CertInfo info = new X509CertInfo();
    141143        Date from = new Date();
     
    193195
    194196        // Sign the cert to identify the algorithm that's used.
     197        PrivateKey privkey = pair.getPrivate();
    195198        X509CertImpl cert = new X509CertImpl(info);
    196199        cert.sign(privkey, algorithm);
  • trunk/src/org/openstreetmap/josm/io/session/SessionLayerExporter.java

    r5391 r8926  
    66import java.util.Collection;
    77
    8 import org.w3c.dom.Element;
    9 
    108import org.openstreetmap.josm.gui.layer.Layer;
    119import org.openstreetmap.josm.io.session.SessionWriter.ExportSupport;
     10import org.w3c.dom.Element;
    1211
    1312public interface SessionLayerExporter {
     
    1514    /**
    1615     * Return the Layers, this Layer depends on.
     16     * @return the layer dependencies
    1717     */
    1818    Collection<Layer> getDependencies();
     
    2020    /**
    2121     * The GUI for exporting this layer.
     22     * @return the export panel
    2223     */
    2324    Component getExportPanel();
    2425
    2526    /**
    26      * Return true, if the layer should be included in the
    27      * list of exported layers.
     27     * Return true, if the layer should be included in the list of exported layers.
    2828     *
    2929     * The user can veto this in the export panel.
     30     * @return {@code true} if the layer should be included in the list of exported layers, {@code false} otherwise.
    3031     */
    3132    boolean shallExport();
    3233
    3334    /**
    34      * Return true, if some data needs to be included in
    35      * the zip archive. This decision depends on the user
     35     * Return true, if some data needs to be included in the zip archive. This decision depends on the user
    3636     * selection in the export panel.
    3737     *
    38      * If any layer requires zip, the user can only save as
    39      * .joz. Otherwise both .jos and .joz are possible.
     38     * If any layer requires zip, the user can only save as .joz. Otherwise both .jos and .joz are possible.
     39     * @return {@code true} if some data needs to be included in the zip archive, {@code false} otherwise.
    4040     */
    4141    boolean requiresZip();
     
    4444     * Save meta data to the .jos file. Return a layer XML element.
    4545     * Use <code>support</code> to save files in the zip archive as needed.
     46     * @param support support class providing export utilities
     47     * @return the resulting XML element
     48     * @throws IOException  if any I/O error occurs
    4649     */
    4750    Element export(ExportSupport support) throws IOException;
    48 
    4951}
    50 
  • trunk/src/org/openstreetmap/josm/io/session/SessionLayerImporter.java

    r4668 r8926  
    44import java.io.IOException;
    55
    6 import org.w3c.dom.Element;
    7 
    86import org.openstreetmap.josm.gui.layer.Layer;
    97import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    108import org.openstreetmap.josm.io.IllegalDataException;
    119import org.openstreetmap.josm.io.session.SessionReader.ImportSupport;
     10import org.w3c.dom.Element;
    1211
    1312public interface SessionLayerImporter {
     13
    1414    /**
    1515     * Load the layer from xml meta-data.
     16     * @param elem XML element
     17     * @param support support class providing import utilities
     18     * @param progressMonitor progress monitor
     19     * @return the resulting layer
     20     * @throws IOException if any I/O error occurs
     21     * @throws IllegalDataException if invalid data is read
    1622     */
    1723    Layer load(Element elem, ImportSupport support, ProgressMonitor progressMonitor) throws IOException, IllegalDataException;
  • trunk/src/org/openstreetmap/josm/io/session/SessionReader.java

    r8850 r8926  
    196196         * Returns null if the URI points to a file inside the zip archive.
    197197         * In this case, inZipPath will be set to the corresponding path.
     198         * @param uriStr the URI as string
     199         * @return the resulting File
     200         * @throws IOException if any I/O error occurs
    198201         */
    199202        public File getFile(String uriStr) throws IOException {
  • trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java

    r8836 r8926  
    142142         * @return the OutputStream you can write to. Never close the returned
    143143         * output stream, but make sure to flush buffers.
     144         * @throws IOException if any I/O error occurs
    144145         */
    145146        public OutputStream getOutputStreamZip(String zipPath) throws IOException {
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r8840 r8926  
    8383    along with this program; if not, write to the Free Software
    8484    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    85 
    8685 */
    87 
    8886public class Diff {
    8987
     
    9492      be needed again later to print the results of the comparison as
    9593      an edit script, if desired.
     94     * @param a first array
     95     * @param b second array
    9696     */
    9797    public Diff(Object[] a, Object[] b) {
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r8924 r8926  
    222222
    223223    /**
    224      * return the modulus in the range [0, n)
     224     * Return the modulus in the range [0, n)
     225     * @param a dividend
     226     * @param n divisor
     227     * @return modulo (remainder of the Euclidian division of a by n)
    225228     */
    226229    public static int mod(int a, int n) {
  • trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateParser.java

    r8811 r8926  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.tools.template_engine;
    3 
    43
    54import static org.openstreetmap.josm.tools.I18n.tr;
     
    1514import org.openstreetmap.josm.tools.template_engine.Tokenizer.TokenType;
    1615
    17 
     16/**
     17 * Template parser.
     18 */
    1819public class TemplateParser {
    1920    private final Tokenizer tokenizer;
     
    2223    private static final Collection<TokenType> CONDITION_WITH_APOSTROPHES_END_TOKENS = Arrays.asList(TokenType.APOSTROPHE);
    2324
     25    /**
     26     * Constructs a new {@code TemplateParser}.
     27     * @param template template to parse
     28     */
    2429    public TemplateParser(String template) {
    2530        this.tokenizer = new Tokenizer(template);
     
    3439    }
    3540
     41    /**
     42     * Parse the template.
     43     * @return the resulting template entry
     44     * @throws ParseError if the template cannot be parsed
     45     */
    3646    public TemplateEntry parse() throws ParseError {
    3747        return parseExpression(EXPRESSION_END_TOKENS);
     
    91101                    result.getEntries().add(new SearchExpressionCondition(
    92102                            SearchCompiler.compile(searchExpression.getText()), condition));
    93                 } catch (org.openstreetmap.josm.actions.search.SearchCompiler.ParseError e) {
     103                } catch (SearchCompiler.ParseError e) {
    94104                    throw new ParseError(searchExpression.getPosition(), e);
    95105                }
     
    121131                Match match = SearchCompiler.compile(searchExpression.getText());
    122132                result = new ContextSwitchTemplate(match, template, searchExpression.getPosition());
    123             } catch (org.openstreetmap.josm.actions.search.SearchCompiler.ParseError e) {
     133            } catch (SearchCompiler.ParseError e) {
    124134                throw new ParseError(searchExpression.getPosition(), e);
    125135            }
     
    129139        return result;
    130140    }
    131 
    132141}
Note: See TracChangeset for help on using the changeset viewer.