com.datastax.data.exploration.util.CommonUtil Maven / Gradle / Ivy
The newest version!
package com.datastax.data.exploration.util;
import com.datastax.data.exploration.biz.datatable.DataType;
import java.text.SimpleDateFormat;
import static com.datastax.data.exploration.util.DateFormat.DATE_FORMAT;
import static com.datastax.data.exploration.util.DateFormat.DATE_TIME_FORMAT;
import static com.datastax.data.exploration.util.DateFormat.TIME_FORMAT;
public class CommonUtil {
public static int columnIndex(String[] columns, String searchColumn) {
int index = -1;
for (int i = 0; i < columns.length; i++) {
if (searchColumn.equals(columns[i])) {
index = i;
break;
}
}
return index;
}
public static int[] columnIndex(String[] columns, String[] searchColumn) {
int[] positions = new int[searchColumn.length];
for(int i=0; i