Class Converter


  • public final class Converter
    extends java.lang.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​(java.lang.String a1notation)  
      static int abcToNum​(java.lang.String val)
      Converts abc to number.
      static Ref areaToRef​(int row, int column, int lastRow, int lastColumn)  
      static <T> java.util.List<T> asList​(T... ary)  
      static java.util.Map asMap​(java.lang.Object... args)  
      static <T> T getFirst​(T... args)  
      static <T> T getLast​(T... args)  
      static java.lang.String numToAbc​(int index)
      Converts 0-based index to abc.
      static int ptToPx​(java.lang.Number pt)  
      static java.lang.String rangeToA1​(int row, int column)
      Converts a range to A1 notation.
      static Ref rangeToRef​(int row, int column)  
      static java.lang.String refToA1​(Ref ref)  
      static java.util.List<Ref> toRefs​(java.lang.String refs)  
      static java.util.List<Ref> toRefs​(java.lang.String refs, java.lang.String separator)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Converter

        public Converter()
    • Method Detail

      • numToAbc

        public static java.lang.String numToAbc​(int index)
        Converts 0-based index to abc.
        Parameters:
        index - 0-based.
        Returns:
      • rangeToA1

        public static java.lang.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)
      • a1ToRef

        public static Ref a1ToRef​(java.lang.String a1notation)
      • abcToNum

        public static int abcToNum​(java.lang.String val)
        Converts abc to number. (like A to 0, B to 1)
        Parameters:
        val -
        Returns:
      • toRefs

        public static java.util.List<Ref> toRefs​(java.lang.String refs)
      • toRefs

        public static java.util.List<Ref> toRefs​(java.lang.String refs,
                                                 java.lang.String separator)
      • refToA1

        public static java.lang.String refToA1​(Ref ref)
      • asList

        public static final <T> java.util.List<T> asList​(T... ary)
      • asMap

        public static java.util.Map asMap​(java.lang.Object... args)
      • ptToPx

        public static int ptToPx​(java.lang.Number pt)
      • getFirst

        public static <T> T getFirst​(T... args)
      • getLast

        public static <T> T getLast​(T... args)