Changeset 8374 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2015-05-17T02:56:15+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r8285 r8374 282 282 * @since 5849 283 283 */ 284 public static finalUrlLabel getBugReportUrlLabel(String debugText) {284 public static UrlLabel getBugReportUrlLabel(String debugText) { 285 285 URL url = getBugReportUrl(debugText); 286 286 if (url != null) { -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r8373 r8374 197 197 * @see #trnc 198 198 */ 199 public static finalString tr(String text, Object... objects) {199 public static String tr(String text, Object... objects) { 200 200 if (text == null) return null; 201 201 return MessageFormat.format(gettext(text, null), objects); … … 214 214 * @see #trnc 215 215 */ 216 public static finalString trc(String context, String text) {216 public static String trc(String context, String text) { 217 217 if (context == null) 218 218 return tr(text); … … 222 222 } 223 223 224 public static finalString trc_lazy(String context, String text) {224 public static String trc_lazy(String context, String text) { 225 225 if (context == null) 226 226 return tr(text); … … 240 240 * @return {@code text} unmodified. 241 241 */ 242 public static finalString marktr(String text) {242 public static String marktr(String text) { 243 243 return text; 244 244 } 245 245 246 public static finalString marktrc(String context, String text) {246 public static String marktrc(String context, String text) { 247 247 return text; 248 248 } … … 271 271 * @see #trnc 272 272 */ 273 public static finalString trn(String singularText, String pluralText, long n, Object... objects) {273 public static String trn(String singularText, String pluralText, long n, Object... objects) { 274 274 return MessageFormat.format(gettextn(singularText, pluralText, null, n), objects); 275 275 } … … 298 298 * @see #trn 299 299 */ 300 public static finalString trnc(String context, String singularText, String pluralText, long n, Object... objects) {300 public static String trnc(String context, String singularText, String pluralText, long n, Object... objects) { 301 301 return MessageFormat.format(gettextn(singularText, pluralText, context, n), objects); 302 302 } 303 303 304 private static finalString gettext(String text, String ctx, boolean lazy) {304 private static String gettext(String text, String ctx, boolean lazy) { 305 305 int i; 306 306 if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) { … … 322 322 } 323 323 324 private static finalString gettext(String text, String ctx) {324 private static String gettext(String text, String ctx) { 325 325 return gettext(text, ctx, false); 326 326 } 327 327 328 328 /* try without context, when context try fails */ 329 private static finalString gettext_lazy(String text, String ctx) {329 private static String gettext_lazy(String text, String ctx) { 330 330 return gettext(text, ctx, true); 331 331 } 332 332 333 private static finalString gettextn(String text, String plural, String ctx, long num) {333 private static String gettextn(String text, String plural, String ctx, long num) { 334 334 int i; 335 335 if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) { … … 360 360 * @return an array of locale objects. 361 361 */ 362 public static finalLocale[] getAvailableTranslations() {362 public static Locale[] getAvailableTranslations() { 363 363 Collection<Locale> v = new ArrayList<>(languages.size()); 364 364 if(getTranslationFile("en") != null) { -
trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
r8322 r8374 151 151 * @since 7299 152 152 */ 153 public static finalSimpleDateFormat newIsoDateFormat() {153 public static SimpleDateFormat newIsoDateFormat() { 154 154 return new SimpleDateFormat("yyyy-MM-dd"); 155 155 } … … 160 160 * @since 7299 161 161 */ 162 public static finalSimpleDateFormat newIsoDateTimeFormat() {162 public static SimpleDateFormat newIsoDateTimeFormat() { 163 163 return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX"); 164 164 } … … 169 169 * @since 7299 170 170 */ 171 public static finalSimpleDateFormat newOsmApiDateTimeFormat() {171 public static SimpleDateFormat newOsmApiDateTimeFormat() { 172 172 // Example: "2010-09-07 14:39:41 UTC". 173 173 // Always parsed with US locale regardless of the current locale in JOSM … … 181 181 * @since 7299 182 182 */ 183 public static finalDateFormat getDateFormat(int dateStyle) {183 public static DateFormat getDateFormat(int dateStyle) { 184 184 if (PROP_ISO_DATES.get()) { 185 185 return newIsoDateFormat(); … … 196 196 * @since 7299 197 197 */ 198 public static finalString formatDate(Date date, int dateStyle) {198 public static String formatDate(Date date, int dateStyle) { 199 199 CheckParameterUtil.ensureParameterNotNull(date, "date"); 200 200 return getDateFormat(dateStyle).format(date); … … 207 207 * @since 7299 208 208 */ 209 public static finalDateFormat getTimeFormat(int timeStyle) {209 public static DateFormat getTimeFormat(int timeStyle) { 210 210 if (PROP_ISO_DATES.get()) { 211 211 // This is not strictly conform to ISO 8601. We just want to avoid US-style times such as 3.30pm … … 222 222 * @since 7299 223 223 */ 224 public static finalString formatTime(Date time, int timeStyle) {224 public static String formatTime(Date time, int timeStyle) { 225 225 CheckParameterUtil.ensureParameterNotNull(time, "time"); 226 226 return getTimeFormat(timeStyle).format(time); … … 234 234 * @since 7299 235 235 */ 236 public static finalDateFormat getDateTimeFormat(int dateStyle, int timeStyle) {236 public static DateFormat getDateTimeFormat(int dateStyle, int timeStyle) { 237 237 if (PROP_ISO_DATES.get()) { 238 238 // This is not strictly conform to ISO 8601. We just want to avoid US-style times such as 3.30pm … … 252 252 * @since 7299 253 253 */ 254 public static finalString formatDateTime(Date datetime, int dateStyle, int timeStyle) {254 public static String formatDateTime(Date datetime, int dateStyle, int timeStyle) { 255 255 CheckParameterUtil.ensureParameterNotNull(datetime, "datetime"); 256 256 return getDateTimeFormat(dateStyle, timeStyle).format(datetime);
Note:
See TracChangeset
for help on using the changeset viewer.