Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ComponentInfo(name="CSVReader", category="Custom")
- public class CSVReader implements java.io.Serializable {
- private static final long serialVersionUID=1L;
- // ---- add your code here -----
- public void plot(
- @ParamInfo(name="CSV File", style="load-dialog", options="") File input,
- @ParamInfo(name="Column", style="default", options="value=0") int col) {
- input.eachLine{l->
- l = l.trim();
- String[] numbers = l.split(";");
- String stringVal = numbers[col];
- double value = java.lang.Double.parseDouble(stringVal);
- // do something with the value
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement