ColumnMap { static int[] compileMapping(String domain, String range) { List<Character> input = StrUtils.toCharList(domain) ; List<Character> output = StrUtils.toCharList(range) ; return compileMapping(input, output) ; } ColumnMap(String input, String output); <T> ColumnMap(String label, List<T> input, List<T> output); <T> ColumnMap(String label, T[] input, T[] output);  ColumnMap(String label, int...elements); int length(); T fetchSlot(int idx, Tuple<T> tuple); T fetchSlot(int idx, T[] tuple); T mapSlot(int idx, Tuple<T> tuple); T mapSlot(int idx, T[] tuple); int mapSlotIdx(int idx); int fetchSlotIdx(int idx); Tuple<T> map(Tuple<T> src); Tuple<T> unmap(Tuple<T> src); @Override String toString(); String getLabel(); String mapName(String word); String unmapName(String word);  }
@Test public void compile1() { int[] x = ColumnMap.compileMapping("SPO", "POS") ; int[] expected = { 2,0,1 } ; assertArrayEquals(expected, x) ; }
@Test public void compile2() { int[] x = ColumnMap.compileMapping("SPOG", "GOPS") ; int[] expected = { 3, 2, 1, 0 } ; assertArrayEquals(expected, x) ; }