Search in sources :

Example 1 with ModificationVisitorAdapter

use of com.thoughtworks.go.domain.ModificationVisitorAdapter in project gocd by gocd.

the class BuildCause method materials.

public Materials materials() {
    final List<Material> materials = new ArrayList<>();
    materialRevisions.accept(new ModificationVisitorAdapter() {

        public void visit(Material material, Revision revision) {
            materials.add(material);
        }
    });
    return new Materials(materials);
}
Also used : MaterialRevision(com.thoughtworks.go.domain.MaterialRevision) Revision(com.thoughtworks.go.domain.materials.Revision) Materials(com.thoughtworks.go.config.materials.Materials) ArrayList(java.util.ArrayList) Material(com.thoughtworks.go.domain.materials.Material) ModificationVisitorAdapter(com.thoughtworks.go.domain.ModificationVisitorAdapter)

Aggregations

Materials (com.thoughtworks.go.config.materials.Materials)1 MaterialRevision (com.thoughtworks.go.domain.MaterialRevision)1 ModificationVisitorAdapter (com.thoughtworks.go.domain.ModificationVisitorAdapter)1 Material (com.thoughtworks.go.domain.materials.Material)1 Revision (com.thoughtworks.go.domain.materials.Revision)1 ArrayList (java.util.ArrayList)1