package konstructs.api;

/**
 * Created by petter on 2016-03-19.
 */
public class BlockUpdate {
    private final Block before;
    private final Block after;

    public BlockUpdate(Block before, Block after) {
        this.before = before;
        this.after = after;
    }

    public Block getBefore() {
        return before;
    }

    public Block getAfter() {
        return after;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BlockUpdate that = (BlockUpdate) o;

        if (!before.equals(that.before)) return false;
        return after.equals(that.after);

    }

    @Override
    public int hashCode() {
        int result = before.hashCode();
        result = 31 * result + after.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "BlockUpdate(" +
                "before=" + before +
                ", after=" + after +
                ')';
    }
}

@@ -29,39 +29,107 @@
 %0A * 
-Created by petter on 2016-03-19
+This class describes an update of the bock world and contains the block before and after the update
 .%0A *
@@ -229,181 +229,531 @@
     
-public BlockUpdate(Block before, Block after) %7B%0A        this.before = before;%0A        this.after = after;%0A    %7D%0A%0A    public Block getBefore() %7B%0A        return before;%0A    %7D%0A
+/**%0A     * Create an immutable instance%0A     * @param before the block before the update%0A     * @param after the block after the update%0A     */%0A    public BlockUpdate(Block before, Block after) %7B%0A        this.before = before;%0A        this.after = after;%0A    %7D%0A%0A    /**%0A     * Returns the block before the update%0A     * @return The block before the update%0A     */%0A    public Block getBefore() %7B%0A        return before;%0A    %7D%0A%0A    /**%0A     * Returns the block after the update%0A     * @return The block after the update%0A     */
 %0A   

Add doc to BlockUpdate class