From 1c4ff1f7b23030d25876a2269714f0743485d35c Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Fri, 30 Sep 2011 04:30:37 +0200 Subject: Remove unused methods --- main/src/cgeo/geocaching/cgBase.java | 45 ------------------------------------ 1 file changed, 45 deletions(-) (limited to 'main/src/cgeo/geocaching/cgBase.java') diff --git a/main/src/cgeo/geocaching/cgBase.java b/main/src/cgeo/geocaching/cgBase.java index 37fd952..19ad634 100644 --- a/main/src/cgeo/geocaching/cgBase.java +++ b/main/src/cgeo/geocaching/cgBase.java @@ -2334,35 +2334,6 @@ public class cgBase { return trackables; } - public static String stripParagraphs(String text) { - if (StringUtils.isBlank(text)) { - return ""; - } - - final Pattern patternP = Pattern.compile("(

|

|
|
)", Pattern.CASE_INSENSITIVE); - final Pattern patternP2 = Pattern.compile("([ ]+)", Pattern.CASE_INSENSITIVE); - final Matcher matcherP = patternP.matcher(text); - final Matcher matcherP2 = patternP2.matcher(text); - - matcherP.replaceAll(" "); - matcherP2.replaceAll(" "); - - return text.trim(); - } - - public static String stripTags(String text) { - if (StringUtils.isBlank(text)) { - return ""; - } - - final Pattern patternP = Pattern.compile("(<[^>]+>)", Pattern.CASE_INSENSITIVE); - final Matcher matcherP = patternP.matcher(text); - - matcherP.replaceAll(" "); - - return text.trim(); - } - public String getHumanDistance(final Float distance) { if (distance == null) { return "?"; @@ -2400,22 +2371,6 @@ public class cgBase { } } - public String getHumanSpeed(float speed) { - double kph = speed * 3.6; - String unit = "km/h"; - - if (this.settings.units == cgSettings.unitsImperial) { - kph /= miles2km; - unit = "mph"; - } - - if (kph < 10.0) { - return String.format(Locale.getDefault(), "%.1f", Double.valueOf((Math.round(kph * 10.0) / 10.0))) + " " + unit; - } else { - return String.format(Locale.getDefault(), "%.0f", Double.valueOf(Math.round(kph))) + " " + unit; - } - } - private static String formatCoordinate(final Double coordIn, final boolean degrees, final String direction, final String digitsFormat) { if (coordIn == null) { return ""; -- cgit v1.1