Changeset 8926 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2015-10-22T02:01:00+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Diff.java
r8840 r8926 83 83 along with this program; if not, write to the Free Software 84 84 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 85 86 85 */ 87 88 86 public class Diff { 89 87 … … 94 92 be needed again later to print the results of the comparison as 95 93 an edit script, if desired. 94 * @param a first array 95 * @param b second array 96 96 */ 97 97 public Diff(Object[] a, Object[] b) { -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r8924 r8926 222 222 223 223 /** 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) 225 228 */ 226 229 public static int mod(int a, int n) { -
trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateParser.java
r8811 r8926 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.tools.template_engine; 3 4 3 5 4 import static org.openstreetmap.josm.tools.I18n.tr; … … 15 14 import org.openstreetmap.josm.tools.template_engine.Tokenizer.TokenType; 16 15 17 16 /** 17 * Template parser. 18 */ 18 19 public class TemplateParser { 19 20 private final Tokenizer tokenizer; … … 22 23 private static final Collection<TokenType> CONDITION_WITH_APOSTROPHES_END_TOKENS = Arrays.asList(TokenType.APOSTROPHE); 23 24 25 /** 26 * Constructs a new {@code TemplateParser}. 27 * @param template template to parse 28 */ 24 29 public TemplateParser(String template) { 25 30 this.tokenizer = new Tokenizer(template); … … 34 39 } 35 40 41 /** 42 * Parse the template. 43 * @return the resulting template entry 44 * @throws ParseError if the template cannot be parsed 45 */ 36 46 public TemplateEntry parse() throws ParseError { 37 47 return parseExpression(EXPRESSION_END_TOKENS); … … 91 101 result.getEntries().add(new SearchExpressionCondition( 92 102 SearchCompiler.compile(searchExpression.getText()), condition)); 93 } catch ( org.openstreetmap.josm.actions.search.SearchCompiler.ParseError e) {103 } catch (SearchCompiler.ParseError e) { 94 104 throw new ParseError(searchExpression.getPosition(), e); 95 105 } … … 121 131 Match match = SearchCompiler.compile(searchExpression.getText()); 122 132 result = new ContextSwitchTemplate(match, template, searchExpression.getPosition()); 123 } catch ( org.openstreetmap.josm.actions.search.SearchCompiler.ParseError e) {133 } catch (SearchCompiler.ParseError e) { 124 134 throw new ParseError(searchExpression.getPosition(), e); 125 135 } … … 129 139 return result; 130 140 } 131 132 141 }
Note:
See TracChangeset
for help on using the changeset viewer.