Ignore:
Timestamp:
2014-02-10T00:51:53+01:00 (11 years ago)
Author:
Don-vip
Message:

javadoc fixes for jdk8 compatibility

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java

    r6380 r6830  
    1919 * Creates and controls a separate audio player thread.
    2020 *
    21  * @author David Earl <david@frankieandshadow.com>
     21 * @author David Earl &lt;david@frankieandshadow.com&gt;
    2222 * @since 547
    2323 */
     
    124124     * @param url The resource to play, which must be a WAV file or stream
    125125     * @param seconds The number of seconds into the audio to start playing
    126      * @param speed Rate at which audio playes (1.0 = real time, > 1 is faster)
     126     * @param speed Rate at which audio playes (1.0 = real time, &gt; 1 is faster)
    127127     * @throws Exception audio fault exception, e.g. can't open stream,  unhandleable audio format
    128128     */
  • trunk/src/org/openstreetmap/josm/tools/AudioUtil.java

    r6380 r6830  
    1414 * Utils functions for audio.
    1515 *
    16  * @author David Earl <david@frankieandshadow.com>
     16 * @author David Earl &lt;david@frankieandshadow.com&gt;
    1717 * @since 1462
    1818 */
     
    2222        // Hide default constructor for utils classes
    2323    }
    24    
     24
    2525    /**
    2626     * Returns calibrated length of recording in seconds.
  • trunk/src/org/openstreetmap/josm/tools/ColorHelper.java

    r6740 r6830  
    55
    66/**
    7  * Helper to convert from color to html string and back
     7 * Helper to convert from color to HTML string and back.
    88 */
    99public final class ColorHelper {
     
    1212        // Hide default constructor for utils classes
    1313    }
    14    
     14
    1515    /**
    1616     * Returns the {@code Color} for the given HTML code.
     
    5555     * Returns the HTML color code (6 or 8 digit).
    5656     * @param col The color to convert
    57      * @param withAlpha if {@code true} and alpha value < 255, return 8-digit color code, else always 6-digit
     57     * @param withAlpha if {@code true} and alpha value &lt; 255, return 8-digit color code, else always 6-digit
    5858     * @return the HTML color code (6 or 8 digit)
    5959     * @since 6655
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r6296 r6830  
    5757    and <code>hashcode</code> methods for the objects compared.
    5858<p>
    59    The basic algorithm is described in: </br>
     59   The basic algorithm is described in: <br>
    6060   "An O(ND) Difference Algorithm and its Variations", Eugene Myers,
    6161   Algorithmica Vol. 1 No. 2, 1986, p 251.
     
    589589        }
    590590
     591        @Override
    591592        public String toString() {
    592593            String s = String.format("%d -%d +%d %d",line0,deleted,inserted,line1);
     
    830831            realindexes = new int[buffered_lines];
    831832        }
    832        
     833
    833834        FileData(Object[] data, Map<Object,Integer> h) {
    834835            this(data.length);
  • trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java

    r6643 r6830  
    3838@SuppressWarnings("CallToThreadDumpStack")
    3939public final class ExceptionUtil {
    40    
     40
    4141    private ExceptionUtil() {
    4242        // Hide default constructor for utils classes
     
    697697
    698698    /**
    699      * Replaces some HTML reserved characters (<, > and &) by their equivalent entity (&lt;, &gt; and &amp;);
     699     * Replaces some HTML reserved characters (&lt;, &gt; and &amp;) by their equivalent entity (&amp;lt;, &amp;gt; and &amp;amp;);
    700700     * @param s The unescaped string
    701701     * @return The escaped string
  • trunk/src/org/openstreetmap/josm/tools/ExifReader.java

    r6643 r6830  
    3131        // Hide default constructor for utils classes
    3232    }
    33    
     33
    3434    /**
    3535     * Returns the date/time from the given JPEG file.
     
    7070     * Returns the image orientation of the given JPEG file.
    7171     * @param filename The JPEG file to read
    72      * @return The image orientation as an {@code int}. Default value is 1. Possible values are listed in EXIF spec as follows:<br>
    73      * <ul>1. The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side.</ul>
    74      * <ul>2. The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side.</ul>
    75      * <ul>3. The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side.</ul>
    76      * <ul>4. The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side.</ul>
    77      * <ul>5. The 0th row is the visual left-hand side of the image, and the 0th column is the visual top.</ul>
    78      * <ul>6. The 0th row is the visual right-hand side of the image, and the 0th column is the visual top.</ul>
    79      * <ul>7. The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom.</ul>
    80      * <ul>8. The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.</ul>
     72     * @return The image orientation as an {@code int}. Default value is 1. Possible values are listed in EXIF spec as follows:<br><ol>
     73     * <li>The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side.</li>
     74     * <li>The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side.</li>
     75     * <li>The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side.</li>
     76     * <li>The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side.</li>
     77     * <li>The 0th row is the visual left-hand side of the image, and the 0th column is the visual top.</li>
     78     * <li>The 0th row is the visual right-hand side of the image, and the 0th column is the visual top.</li>
     79     * <li>The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom.</li>
     80     * <li>The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.</li></ol>
    8181     * @see <a href="http://www.impulseadventure.com/photo/exif-orientation.html">http://www.impulseadventure.com/photo/exif-orientation.html</a>
    8282     * @see <a href="http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto">http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto</a>
     
    133133        return null;
    134134    }
    135    
     135
    136136    /**
    137137     * Returns the direction of the given JPEG file.
     
    152152        return null;
    153153    }
    154    
     154
    155155    /**
    156156     * Returns the direction of the given EXIF GPS directory.
     
    176176            double min = components[1].doubleValue();
    177177            double sec = components[2].doubleValue();
    178    
     178
    179179            if (Double.isNaN(deg) && Double.isNaN(min) && Double.isNaN(sec))
    180180                throw new IllegalArgumentException();
    181    
     181
    182182            value = (Double.isNaN(deg) ? 0 : deg + (Double.isNaN(min) ? 0 : (min / 60)) + (Double.isNaN(sec) ? 0 : (sec / 3600)));
    183    
     183
    184184            if (dirGps.getString(gpsTagRef).charAt(0) == cRef) {
    185185                value = -value;
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r6607 r6830  
    3737 */
    3838public final class Geometry {
    39    
     39
    4040    private Geometry() {
    4141        // Hide default constructor for utils classes
    4242    }
    43    
     43
    4444    public enum PolygonIntersection {FIRST_INSIDE_SECOND, SECOND_INSIDE_FIRST, OUTSIDE, CROSSING}
    4545
     
    771771     * Tests if the polygon formed by {@code nodes} is inside the multipolygon {@code multiPolygon}. The nullable argument
    772772     * {@code isOuterWayAMatch} allows to decide if the immediate {@code outer} way of the multipolygon is a match.
    773      * <p/>
     773     * <p>
    774774     * If {@code nodes} contains exactly one element, then it is checked whether that one node is inside the multipolygon.
    775775     */
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r6796 r6830  
    3232 */
    3333public final class I18n {
    34    
     34
    3535    private I18n() {
    3636        // Hide default constructor for utils classes
    3737    }
    38    
     38
    3939    private enum PluralMode { MODE_NOTONE, MODE_NONE, MODE_GREATERONE,
    4040        MODE_CS/*, MODE_AR*/, MODE_PL/*, MODE_RO*/, MODE_RU, MODE_SK/*, MODE_SL*/}
     
    135135     * These strings are collected by a script that runs on the source code files.
    136136     * After translation, the localizations are distributed with the main program.
    137      * <br/>
     137     * <br>
    138138     * For example, {@code tr("JOSM''s default value is ''{0}''.", val)}.
    139      * <br/>
     139     * <br>
    140140     * Use {@link #trn} for distinguishing singular from plural text, i.e.,
    141141     * do not use {@code tr(size == 1 ? "singular" : "plural")} nor
     
    207207     * Translates some text for the current locale and distinguishes between
    208208     * {@code singularText} and {@code pluralText} depending on {@code n}.
    209      * <br/>
     209     * <br>
    210210     * For instance, {@code trn("There was an error!", "There were errors!", i)} or
    211211     * {@code trn("Found {0} error in {1}!", "Found {0} errors in {1}!", i, Integer.toString(i), url)}.
  • trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java

    r6643 r6830  
    8585     * Openstreetmap.org changed it's URL scheme in August 2013, which breaks the URL parsing.
    8686     * The following function, called by the old parse function if necessary, provides parsing new URLs
    87      * the new URLs follow the scheme http://www.openstreetmap.org/#map=18/51.71873/8.76164&layers=CN
     87     * the new URLs follow the scheme http://www.openstreetmap.org/#map=18/51.71873/8.76164&amp;layers=CN
    8888     * @param url string for parsing
    8989     * @return Bounds if hashurl, {@code null} otherwise
     
    294294     * @param zoom zoom depth of display
    295295     * @return link to display that area in OSM map
    296      * 
     296     *
    297297     * @since 6453
    298298     */
  • trunk/src/org/openstreetmap/josm/tools/PlatformHook.java

    r6443 r6830  
    1111 */
    1212public interface PlatformHook {
    13    
     13
    1414    /**
    1515      * The preStartupHook will be called extremly early. It is
     
    4747      * shortuts from this hook, but only "systemCuts"!
    4848      *
    49       * BTW: SystemCuts should be named "system:<whatever>",
     49      * BTW: SystemCuts should be named "system:&lt;whatever&gt;",
    5050      * and it'd be best if sou'd recycle the names already used
    5151      * by the Windows and OSX hooks. Especially the later has
     
    6969      * Another reason not to use the implementation in the *nix
    7070      * hook are LAFs that don't understand HTML, such as the OSX LAFs.
    71       * 
    72      * @param name Tooltip text to display 
     71      *
     72     * @param name Tooltip text to display
    7373     * @param sc Shortcut associated (to display accelerator between parenthesis)
    7474     * @return Full tooltip text (name + accelerator)
  • trunk/src/org/openstreetmap/josm/tools/TextTagParser.java

    r6362 r6830  
    2828 */
    2929public final class TextTagParser {
    30    
     30
    3131    // properties need JOSM restart to apply, modified rarely enough
    3232    protected static final int MAX_KEY_LENGTH = Main.pref.getInteger("tags.paste.max-key-length", 50);
     
    3434    protected static final String KEY_PATTERN = Main.pref.get("tags.paste.tag-pattern", "[0-9a-zA-Z:_]*");
    3535    protected static final int MAX_VALUE_LENGTH = 255;
    36    
     36
    3737    private TextTagParser() {
    3838        // Hide default constructor for utils classes
    3939    }
    40    
     40
    4141    public static class TextAnalyzer {
    4242        boolean quotesStarted = false;
     
    5252            n = data.length();
    5353        }
    54        
     54
    5555        /**
    5656         * Read tags from "Free format"
     
    7272            return tags;
    7373        }
    74        
     74
    7575        private String parseString(String stopChars) {
    7676            char[] stop = stopChars.toCharArray();
     
    9595                    pos++;
    9696                    break;
    97                 } else if (!quotesStarted && (Arrays.binarySearch(stop, c)>=0)) { 
     97                } else if (!quotesStarted && (Arrays.binarySearch(stop, c)>=0)) {
    9898                    // stop-symbol found
    9999                    pos++;
     
    110110            return res.trim();
    111111        }
    112        
     112
    113113        private void skipSign() {
    114114            char c;
     
    155155
    156156    /**
    157      * Try to find tag-value pairs in given text 
     157     * Try to find tag-value pairs in given text
    158158     * @param text - text in which tags are looked for
    159159     * @param splitRegex - text is splitted into parts with this delimiter
     
    175175                     v = unescape(v);
    176176                     if (k==null || v==null) return null;
    177                  } 
     177                 }
    178178                 tags.put(k,v);
    179179            } else {
     
    185185         }  else {
    186186            return null;
    187          }   
    188     }
    189  
     187         }
     188    }
     189
    190190    public static Map<String,String> getValidatedTagsFromText(String buf) {
    191191        Map<String,String> tags = readTagsFromText(buf);
    192192        return validateTags(tags) ? tags : null;
    193193    }
    194    
     194
    195195    /**
    196196     * Apply different methods to extract tag-value pairs from arbitrary text
     
    198198     * @return null if no format is suitable
    199199     */
    200    
     200
    201201    public static Map<String,String> readTagsFromText(String buf) {
    202202        Map<String,String> tags;
    203        
     203
    204204        // Format
    205205        // tag1\tval1\ntag2\tval2\n
     
    209209
    210210        // Format
    211         // a=b \n c=d \n "a b"=hello 
     211        // a=b \n c=d \n "a b"=hello
    212212        // SORRY: "a=b" = c is not supported fror now, only first = will be considered
    213213        // a = "b=c" is OK
     
    216216                // try format  t1=v1\n t2=v2\n ...
    217217        if (tags!=null) return tags;
    218        
     218
    219219        // JSON-format
    220220        String bufJson = buf.trim();
    221221        // trim { }, if there are any
    222222        if (bufJson.startsWith("{") && bufJson.endsWith("}") ) bufJson = bufJson.substring(1,bufJson.length()-1);
    223         tags = readTagsByRegexp(bufJson, "[\\s]*,[\\s]*", 
     223        tags = readTagsByRegexp(bufJson, "[\\s]*,[\\s]*",
    224224                "[\\s]*(\\\".*?[^\\\\]\\\")"+"[\\s]*:[\\s]*"+"(\\\".*?[^\\\\]\\\")[\\s]*", true);
    225225        if (tags!=null) return tags;
    226226
    227         // Free format 
     227        // Free format
    228228        // a 1 "b" 2 c=3 d 4 e "5"
    229229        TextAnalyzer parser = new TextAnalyzer(buf);
     
    234234    /**
    235235     * Check tags for correctness and display warnings if needed
    236      * @param tags - map key->value to check
     236     * @param tags - map key-&gt;value to check
    237237     * @return true if the tags should be pasted
    238238     */
     
    265265        return true;
    266266    }
    267    
     267
    268268    private static int warning(String text, String data, String code) {
    269269        ExtendedDialog ed = new ExtendedDialog(
     
    304304                    tr("Warning"),
    305305                    new String[]{tr("Ok"), tr("Clear buffer")});
    306        
     306
    307307        ed.setButtonIcons(new String[]{"ok.png", "dialogs/delete.png"});
    308        
     308
    309309        ed.setContent(p);
    310310        ed.setDefaultButton(1);
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r6823 r6830  
    261261
    262262    /**
    263      * convert float range 0 <= x <= 1 to integer range 0..255
     263     * convert float range 0 &lt;= x &lt;= 1 to integer range 0..255
    264264     * when dealing with colors and color alpha value
    265265     * @return null if val is null, the corresponding int if val is in the
     
    275275
    276276    /**
    277      * convert integer range 0..255 to float range 0 <= x <= 1
     277     * convert integer range 0..255 to float range 0 &lt;= x &lt;= 1
    278278     * when dealing with colors and color alpha value
    279279     */
     
    317317
    318318    /**
    319      * Simple file copy function that will overwrite the target file.<br/>
     319     * Simple file copy function that will overwrite the target file.<br>
    320320     * Taken from <a href="http://www.rgagnon.com/javadetails/java-0064.html">this article</a> (CC-NC-BY-SA)
    321321     * @param in The source file
     
    526526     * Topological sort.
    527527     *
    528      * @param dependencies contains mappings (key -> value). In the final list of sorted objects, the key will come
     528     * @param dependencies contains mappings (key -&gt; value). In the final list of sorted objects, the key will come
    529529     * after the value. (In other words, the key depends on the value(s).)
    530530     * There must not be cyclic dependencies.
     
    836836     * @param elapsedTime The duration in milliseconds
    837837     * @return A human readable string for the given duration
    838      * @throws IllegalArgumentException if elapsedTime is < 0
     838     * @throws IllegalArgumentException if elapsedTime is &lt; 0
    839839     * @since 6354
    840840     */
     
    867867    /**
    868868     * Returns a human readable representation of a list of positions.
    869      * <p/>
     869     * <p>
    870870     * For instance, {@code [1,5,2,6,7} yields "1-2,5-7
    871871     * @param positionList a list of positions
Note: See TracChangeset for help on using the changeset viewer.