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

moxproxy.builders.CollectionBuilder Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package moxproxy.builders;

import java.util.ArrayList;
import java.util.List;

public abstract class CollectionBuilder extends BaseBuilder {

    private List items;

    CollectionBuilder(Parent parent, Validator validator){
        super(parent, validator);
        items = new ArrayList<>();
    }

    ChildBuilder addItem(){
        ChildBuilder newChild = createChildBuilder();
        items.add(newChild);
        return newChild;
    }

    List getItems(){
        return items;
    }

    protected abstract ChildBuilder createChildBuilder();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy