Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.File;
- import java.util.ArrayList;
- import java.util.List;
- public class GeodataTxtParser extends TxtParser {
- static int id = 1;
- public GeodataTxtParser(File file) {
- super(file);
- }
- public List parse() {
- List<String> lines = super.parse();
- List<String> results = new ArrayList<String>();
- String[] data = null;
- for(String line: lines){
- data = line.split(" ");
- double x = Double.parseDouble(data[1]);
- double y = Double.parseDouble(data[2]);
- double z = Double.parseDouble(data[3]);
- id++;
- results.add(data[0]+ data[1]+data[2]+data[3]);
- }
- return results;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement