class HudsonBuildBuilder {

    HudsonBuild createHudsonBuild(Build build, Set<HudsonCommiter> commiters) {
        HudsonBuild hudsonBuild = new HudsonBuild();
        hudsonBuild.setState(build.getResult());
        hudsonBuild.setDuration(build.getDuration());
        hudsonBuild.setStartTime(new Date(build.getTimestamp()));
        hudsonBuild.setSuccessful(HudsonXmlHelper.isSuccessful(build));
        hudsonBuild.setCommiters(commiters);
        hudsonBuild.setBuildNumber(build.getNumber());
        return hudsonBuild;
    }

}