diff options
author | Christophe Cornu <ccornu> | 2004-11-12 21:17:11 +0000 |
---|---|---|
committer | Christophe Cornu <ccornu> | 2004-11-12 21:17:11 +0000 |
commit | 9d8c858dafd46bb2fed811f7defee6ee096d5173 (patch) | |
tree | d65e1f916614548b20b49c4590dd46c317f9f375 /bundles/org.eclipse.swt | |
parent | 1dbbdfd4d6352ecfb62b0dd10067331c5593f0e2 (diff) | |
download | eclipse.platform.swt-9d8c858dafd46bb2fed811f7defee6ee096d5173.tar.gz eclipse.platform.swt-9d8c858dafd46bb2fed811f7defee6ee096d5173.tar.xz eclipse.platform.swt-9d8c858dafd46bb2fed811f7defee6ee096d5173.zip |
unused helpers
Diffstat (limited to 'bundles/org.eclipse.swt')
2 files changed, 1 insertions, 122 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2me/org/eclipse/swt/internal/Compatibility.java b/bundles/org.eclipse.swt/Eclipse SWT/common_j2me/org/eclipse/swt/internal/Compatibility.java index a781201598..50e7f438c3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2me/org/eclipse/swt/internal/Compatibility.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common_j2me/org/eclipse/swt/internal/Compatibility.java @@ -37,11 +37,6 @@ import java.io.*; * </ul> */ public final class Compatibility { - -/** - * Returns the PI constant as a double. - */ -public static double PI = (double)3.141592653589793; /** * Sine table @@ -133,25 +128,6 @@ public static int ceil(int p, int q) { } /** - * Answers the most positive (i.e. closest to positive infinity) - * integer value which is less than the number obtained by dividing - * the first argument p by the second argument q. - * - * @param p numerator - * @param q denominator (must be different from zero) - * @return the floor of the rational number p / q. - */ -public static int floor(int p, int q) { - int res = p / q; - if ((p % q == 0) || - (res > 0) || - ((res == 0) && ((p > 0 && q > 0) || (p < 0 && q < 0)))) - return res; - else - return res - 1; -} - -/** * Answers the result of rounding to the closest integer the number obtained * by dividing the first argument p by the second argument q. * <p> @@ -272,24 +248,6 @@ public static void exec(String prog) throws java.io.IOException { } /** - * Execute progArray[0] in a separate platform process if the - * underlying platform support this. - * <p> - * The new process inherits the environment of the caller. - * <p> - * - * @param progArray array containing the program to execute and its arguments - * - * @exception IOException - * if the program cannot be executed - * @exception SecurityException - * if the current SecurityManager disallows program execution - */ -public static void exec(String[] progArray) throws java.io.IOException{ - throw new IOException(); -} - -/** * Returns the NLS'ed message for the given argument. This is only being * called from SWT. * @@ -356,34 +314,4 @@ public static String getMessage(String key) { */ public static void interrupt() { } - -/** - * Compares two instances of class String ignoring the case of the - * characters and answers if they are equal. - * - * @param s1 string - * @param s2 string - * @return true if the two instances of class String are equal - */ -public static boolean equalsIgnoreCase(String s1, String s2) { - if (s1 == s2) return true; - if (s2 == null || s1.length() != s2.length()) return false; - - char[] cArray1 = s1.toCharArray(); - char[] cArray2 = s2.toCharArray(); - int length = s1.length(); - char c1, c2; - - for (int index = 0; index < length; index++) { - c1 = cArray1[index]; - c2 = cArray2[index]; - if (c1 != c2 && - Character.toUpperCase(c1) != Character.toUpperCase(c2) && - Character.toLowerCase(c1) != Character.toLowerCase(c2)) { - return false; - } - } - return true; -} - } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java b/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java index ba3b062038..b25d27df07 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java @@ -40,12 +40,7 @@ import org.eclipse.swt.SWT; */ public final class Compatibility { -/** - * Returns the PI constant as a double. - */ -public static double PI = Math.PI; - -static double toRadians = PI / 180; +static double toRadians = Math.PI / 180; /** * Answers the length of the side adjacent to the given angle @@ -95,19 +90,6 @@ public static int ceil(int p, int q) { } /** - * Answers the most positive (i.e. closest to positive infinity) - * integer value which is less than the number obtained by dividing - * the first argument p by the second argument q. - * - * @param p numerator - * @param q denominator (must be different from zero) - * @return the floor of the rational number p / q. - */ -public static int floor(int p, int q) { - return (int)Math.floor((double)p / q); -} - -/** * Answers the result of rounding to the closest integer the number obtained * by dividing the first argument p by the second argument q. * <p> @@ -223,24 +205,6 @@ public static void exec(String prog) throws java.io.IOException { Runtime.getRuntime().exec(prog); } -/** - * Execute progArray[0] in a separate platform process if the - * underlying platform support this. - * <p> - * The new process inherits the environment of the caller. - * <p> - * - * @param progArray array containing the program to execute and its arguments - * - * @exception IOException - * if the program cannot be executed - * @exception SecurityException - * if the current SecurityManager disallows program execution - */ -public static void exec(String[] progArray) throws java.io.IOException{ - Runtime.getRuntime().exec(progArray); -} - private static ResourceBundle msgs = null; /** @@ -282,17 +246,4 @@ public static String getMessage(String key) { public static void interrupt() { Thread.currentThread().interrupt(); } - -/** - * Compares two instances of class String ignoring the case of the - * characters and answers if they are equal. - * - * @param s1 string - * @param s2 string - * @return true if the two instances of class String are equal - */ -public static boolean equalsIgnoreCase(String s1, String s2) { - return s1.equalsIgnoreCase(s2); -} - } |