org.proteios.util
Class Coordinate
java.lang.Object
org.proteios.util.Coordinate
public class Coordinate
- extends Object
Util class for coordinate transformations in base.
- Version:
- 2.0
- Author:
- Enell
- Last modified
- $Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $
|
Method Summary |
static int |
alphaToNumeric(String s)
Convert an alphanumeric coordinate to a numeric coordinate, case is unimportent. |
static String |
numericToAlpha(int i)
Convert a numeric coordinate to an alphanumeric coordinate. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Coordinate
public Coordinate()
alphaToNumeric
public static int alphaToNumeric(String s)
- Convert an alphanumeric coordinate to a numeric coordinate, case is unimportent.
| Alphanumeric coordinate | Numeric coordinate |
| a | 1 |
| ... | ... |
| z | 26 |
| aa | 27 |
| ... | ... |
| az | 52 |
| ba | 53 |
| ... | ... |
| zz | 702 |
| aaa | 703 |
- Parameters:
s - The string representation of the alphanumeric coordinate.
- Returns:
- The int representation of the numeric coordinate.
numericToAlpha
public static String numericToAlpha(int i)
- Convert a numeric coordinate to an alphanumeric coordinate. See
alphaToNumeric(String) for details.
- Parameters:
i - The int representation of the numeric coordinate.
- Returns:
- The string representation of the alphanumeric coordinate.