All Downloads are FREE. Search and download functionalities are using the official Maven repository.

vagrant.impl.cli.parser.BoxListParser Maven / Gradle / Ivy

There is a newer version: 0.2.0
Show newest version
package vagrant.impl.cli.parser;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;

import vagrant.api.domain.Box;

public class BoxListParser implements CliParser> {

    @Override
    public Collection parse(String out) {
        Collection> list = new CvsParser().parse(out);
        Collection boxes = new ArrayList();
        for (Map item : list) {
            boxes.add(new Box(item.get("box-name"), item.get("box-version"), item.get("box-provider")));
        }
        return boxes;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy