|
|
@ -102,22 +102,22 @@ public class AutoTypeCalculate { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static boolean isNumberData(List<String> values) { |
|
|
|
private static boolean isNumberData(List<String> values) { |
|
|
|
for (String value : values) { |
|
|
|
for (Pattern pattern : dataPatterns) { |
|
|
|
if (!isNumberData(value)) { |
|
|
|
if (isNumberData(values, pattern)) { |
|
|
|
return false; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static boolean isNumberData(String value) { |
|
|
|
private static boolean isNumberData(List<String> values, Pattern pattern) { |
|
|
|
for (Pattern pattern : dataPatterns) { |
|
|
|
for (String value : values) { |
|
|
|
Matcher matcher = pattern.matcher(value); |
|
|
|
Matcher matcher = pattern.matcher(value); |
|
|
|
if (matcher.matches()) { |
|
|
|
if (!matcher.matches()) { |
|
|
|
return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static List<ColumnInfo> calculateField(String tableName, List<String> columns) { |
|
|
|
private static List<ColumnInfo> calculateField(String tableName, List<String> columns) { |
|
|
|