Instead of building up the java object as the query goes along, a vector of closures are created. When the Pipeline object is finally needed, the closures are then all applied at once to a new query object and everything is executed. This allows for people to combine queries relatively easily without fear of the mutability of the java objects.