コード例 #1
0
 @Override
 public boolean containsColumn(String headerName) {
   if (headerName == null) {
     return false;
   }
   return context.indexOf(headerName) != -1;
 }
コード例 #2
0
 private MetaData getMetaData(Enum<?> column) {
   String[] headers = context.headers();
   if (headers == null || headers.length == 0) {
     throw new IllegalStateException(
         "No headers parsed from input nor provided in the user settings. Only index-based operations are available.");
   }
   return getMetaData(context.indexOf(column));
 }
コード例 #3
0
 private MetaData getMetaData(String name) {
   int index = context.indexOf(name);
   if (index == -1) {
     getValidatedHeaders();
     throw new IllegalArgumentException(
         "Header name '"
             + name
             + "' not found. Available columns are: "
             + Arrays.asList(headers()));
   }
   return getMetaData(index);
 }