public CoverageCoordAxisBuilder setDependsOn(String dependsOn) { if (dependsOn != null && dependsOn.trim().length() > 0) { List<String> temp = new ArrayList<>(); Collections.addAll(temp, StringUtil2.splitString(dependsOn)); this.dependsOn = Collections.unmodifiableList(temp); } else { this.dependsOn = Collections.emptyList(); } return this; }
public void addDatasetType(String datasetTypes) { // if they list datasetType explicitly, remove defaults if (!explicit) datasets = EnumSet.noneOf(FmrcDatasetType.class); explicit = true; String[] types = StringUtil2.splitString(datasetTypes); for (String type : types) { try { FmrcDatasetType fdt = FmrcDatasetType.valueOf(type); datasets.add(fdt); } catch (Exception e) { log.warn("Dont recognize FmrcDatasetType " + type); } } }
public void addDatasetType(String datasetTypes) { // if they list datasetType explicitly, remove defaults if (!explicit) datasets = EnumSet.noneOf(PointDatasetType.class); explicit = true; String[] types = StringUtil2.splitString(datasetTypes); for (String type : types) { try { PointDatasetType fdt = PointDatasetType.valueOf(type); datasets.add(fdt); } catch (Exception e) { log.warn("Dont recognize PointDatasetType " + type); } } }
public void addDatasetType(String datasetTypes) { // if they list datasetType explicitly, remove defaults if (!explicit) datasets = EnumSet.noneOf(FmrcDatasetType.class); explicit = true; String[] types = StringUtil2.splitString(datasetTypes); for (String type : types) { try { FmrcDatasetType fdt = FmrcDatasetType.valueOf(type); datasets.add(fdt); } catch (Exception e) { log.warn("Dont recognize FmrcDatasetType " + type); } } }
public void addDatasetType(String datasetTypes) { // if they list datasetType explicitly, remove defaults if (!explicit) datasets = EnumSet.noneOf(PointDatasetType.class); explicit = true; String[] types = StringUtil2.splitString(datasetTypes); for (String type : types) { try { PointDatasetType fdt = PointDatasetType.valueOf(type); datasets.add(fdt); } catch (Exception e) { log.warn("Dont recognize PointDatasetType " + type); } } }
public void addDatasetType(String datasetTypes) { // if they list datasetType explicitly, remove defaults if (!explicitDatasets) datasets = EnumSet.noneOf(GribDatasetType.class); explicitDatasets = true; String[] types = StringUtil2.splitString(datasetTypes); for (String type : types) { try { GribDatasetType fdt = GribDatasetType.valueOf(type); datasets.add(fdt); } catch (Exception e) { log.warn("Dont recognize GribDatasetType {}", type); } } }
public void addDatasetType(String datasetTypes) { // if they list datasetType explicitly, remove defaults if (!explicit) datasets = EnumSet.noneOf(FmrcDatasetType.class); explicit = true; String[] types = StringUtil2.splitString(datasetTypes); for (String type : types) { try { FmrcDatasetType fdt = FmrcDatasetType.valueOf(type); datasets.add(fdt); } catch (Exception e) { log.warn("Dont recognize FmrcDatasetType " + type); } } }
public void addDatasetType(String datasetTypes) { // if they list datasetType explicitly, remove defaults if (!explicit) datasets = EnumSet.noneOf(PointDatasetType.class); explicit = true; String[] types = StringUtil2.splitString(datasetTypes); for (String type : types) { try { PointDatasetType fdt = PointDatasetType.valueOf(type); datasets.add(fdt); } catch (Exception e) { log.warn("Dont recognize PointDatasetType " + type); } } }
public void addDatasetType(String datasetTypes) { // if they list datasetType explicitly, remove defaults if (!explicitDatasets) datasets = EnumSet.noneOf(GribDatasetType.class); explicitDatasets = true; String[] types = StringUtil2.splitString(datasetTypes); for (String type : types) { try { GribDatasetType fdt = GribDatasetType.valueOf(type); if (fdt == GribDatasetType.LatestFile) fdt = GribDatasetType.Latest; datasets.add(fdt); } catch (Exception e) { log.warn("Dont recognize GribDatasetType {}", type); } } }
public void addDatasetType(String datasetTypes) { // if they list datasetType explicitly, remove defaults if (!explicitDatasets) datasets = EnumSet.noneOf(GribDatasetType.class); explicitDatasets = true; String[] types = StringUtil2.splitString(datasetTypes); for (String type : types) { try { GribDatasetType fdt = GribDatasetType.valueOf(type); if (fdt == GribDatasetType.LatestFile) fdt = GribDatasetType.Latest; datasets.add(fdt); } catch (Exception e) { log.warn("Dont recognize GribDatasetType {}", type); } } }
int sepLength = sep.length(); switch (sepLength) { case 0: String[] tokens = splitString(fullString); // default to use white space if separator is "" strs = Arrays.asList(tokens); break; String[] tokens = splitString(fullString); strs = Arrays.asList(tokens);
switch (sepLength) { case 0: String[] tokens = splitString(fullString); // default to use white space if separator is "" strs = Arrays.asList(tokens); break; String[] tokens = splitString(fullString); strs = Arrays.asList(tokens);
/** * Convert a udunit period string into a CalendarPeriod * @param udunit period string * @return CalendarPeriod or null if illegal */ public static CalendarPeriod of(String udunit) { String[] split = StringUtil2.splitString(udunit); if (split.length != 2) return null; try { int value = Integer.parseInt(split[0]); CalendarPeriod.Field unit = CalendarPeriod.fromUnitString(split[1]); return CalendarPeriod.of(value, unit); } catch (Throwable t) { return null; } }
if (line == null) break; if ((line.length() == 0) || line.startsWith("#")) continue; String[] flds = StringUtil2.splitString(line);
/** * Convert a udunit period string into a CalendarPeriod * @param udunit period string : "[val] unit" * @return CalendarPeriod or null if illegal */ public static CalendarPeriod of(String udunit) { int value; String units; String[] split = StringUtil2.splitString(udunit); if (split.length == 1) { value = 1; units = split[0]; } else if (split.length == 2) { try { value = Integer.parseInt(split[0]); } catch (Throwable t) { return null; } units = split[1]; } else return null; CalendarPeriod.Field unit = CalendarPeriod.fromUnitString(units); return CalendarPeriod.of(value, unit); }
/** * Convert a udunit period string into a CalendarPeriod * @param udunit period string : "[val] unit" * @return CalendarPeriod or null if illegal */ public static CalendarPeriod of(String udunit) { int value; String units; String[] split = StringUtil2.splitString(udunit); if (split.length == 1) { value = 1; units = split[0]; } else if (split.length == 2) { try { value = Integer.parseInt(split[0]); } catch (Throwable t) { return null; } units = split[1]; } else return null; CalendarPeriod.Field unit = CalendarPeriod.fromUnitString(units); return CalendarPeriod.of(value, unit); }
if (line != null) { line = StringUtil2.remove(line, '*'); String[] split = StringUtil2.splitString(line); scale = Integer.parseInt(split[0].trim()); refVal = Integer.parseInt(split[1].trim());
String[] flds = StringUtil2.splitString(line); int fxy = Integer.parseInt(flds[0]); int y = fxy % 1000; String[] flds = StringUtil2.splitString(line); String fxys = cleanNumber(flds[0]); int fxy = Integer.parseInt(fxys);
String[] tokens = StringUtil2.splitString(values); List<String> valList = Arrays.asList(tokens); v.setValues(valList);
return; String[] dims = StringUtil2.splitString(dimName); List<Dimension> dimList = new ArrayList<>(); for (String s : dims) {