@@ -0,0 +1,3305 @@
+/*%0A * Copyright (c) 2016 Andrejs Mivre%C5%86iks%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy%0A * of this software and associated documentation files (the %22Software%22), to deal%0A * in the Software without restriction, including without limitation the rights%0A * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0A * copies of the Software, and to permit persons to whom the Software is%0A * furnished to do so, subject to the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included in all%0A * copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0A * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE%0A * SOFTWARE.%0A */%0A%0Apackage eu.mivrenik.particles.model;%0A%0Aimport java.util.Set;%0A%0Apublic class ExperimentState %7B%0A    private final ExperimentSettings settings;%0A    private final Set%3CParticle%3E particles;%0A    private long time; // microseconds since the beginning of experiment%0A%0A    ExperimentState(final Builder builder) %7B%0A        settings = builder.getSettings();%0A        particles = builder.getParticles();%0A        time = builder.getTime();%0A    %7D%0A%0A    public ExperimentSettings getSettings() %7B%0A        return settings;%0A    %7D%0A%0A    public Set%3CParticle%3E getParticles() %7B%0A        return particles;%0A    %7D%0A%0A    public long getTime() %7B%0A        return time;%0A    %7D%0A%0A    @Override%0A    public boolean equals(final Object o) %7B%0A        if (this == o) return true;%0A        if (o == null %7C%7C getClass() != o.getClass()) return false;%0A%0A        ExperimentState that = (ExperimentState) o;%0A%0A        if (time != that.time) return false;%0A        if (!settings.equals(that.settings)) return false;%0A        return particles.equals(that.particles);%0A%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        int result = settings.hashCode();%0A        result = 31 * result + particles.hashCode();%0A        result = 31 * result + (int) (time %5E (time %3E%3E%3E 32));%0A        return result;%0A    %7D%0A%0A    Builder newBuilder() %7B%0A        return new Builder();%0A    %7D%0A%0A    class Builder %7B%0A        private ExperimentSettings settings;%0A        private Set%3CParticle%3E particles;%0A        private long time;%0A%0A        Builder setParticles(final Set%3CParticle%3E particles) %7B%0A            this.particles = particles;%0A%0A            return this;%0A        %7D%0A%0A        Builder setSettings(final ExperimentSettings settings) %7B%0A            this.settings = settings;%0A%0A            return this;%0A        %7D%0A%0A        Builder setTime(final long microseconds) %7B%0A            time = microseconds;%0A%0A            return this;%0A        %7D%0A%0A        public ExperimentSettings getSettings() %7B%0A            return settings;%0A        %7D%0A%0A        public Set%3CParticle%3E getParticles() %7B%0A            return particles;%0A        %7D%0A%0A        public long getTime() %7B%0A            return time;%0A        %7D%0A%0A        ExperimentState build() %7B%0A            return new ExperimentState(this);%0A        %7D%0A    %7D%0A%7D%0A

Add ExperimentState class (#7)