Package io.keikai.util
Class Converter
- java.lang.Object
-
- io.keikai.util.Converter
-
public final class Converter extends Object
- Author:
- jumperchen
-
-
Constructor Summary
Constructors Constructor Description Converter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Ref
a1ToRef(String a1notation)
static int
abcToNum(String val)
Converts abc to number.static Ref
areaToRef(int row, int column, int lastRow, int lastColumn)
static <T> List<T>
asList(T... ary)
static Map
asMap(Object... args)
static <T> T
getFirst(T... args)
static <T> T
getLast(T... args)
static String
numToAbc(int index)
Converts 0-based index to abc.static int
ptToPx(Number pt)
static String
rangeToA1(int row, int column)
Converts a range to A1 notation.static Ref
rangeToRef(int row, int column)
static String
refToA1(Ref ref)
static List<Ref>
toRefs(String refs)
static List<Ref>
toRefs(String refs, String separator)
-
-
-
Method Detail
-
numToAbc
public static String numToAbc(int index)
Converts 0-based index to abc.- Parameters:
index
- 0-based.- Returns:
-
rangeToA1
public static String rangeToA1(int row, int column)
Converts a range to A1 notation.
-
rangeToRef
public static Ref rangeToRef(int row, int column)
-
areaToRef
public static Ref areaToRef(int row, int column, int lastRow, int lastColumn)
-
abcToNum
public static int abcToNum(String val)
Converts abc to number. (like A to 0, B to 1)- Parameters:
val
-- Returns:
-
asList
public static final <T> List<T> asList(T... ary)
-
ptToPx
public static int ptToPx(Number pt)
-
getFirst
public static <T> T getFirst(T... args)
-
getLast
public static <T> T getLast(T... args)
-
-