package konstructs.api;

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

    public BlockUpdate(Block from, Block to) {
        this.from = from;
        this.to = to;
    }

    public Block getFrom() {
        return from;
    }

    public Block getTo() {
        return to;
    }

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

        BlockUpdate that = (BlockUpdate) o;

        if (!from.equals(that.from)) return false;
        return to.equals(that.to);

    }

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

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

@@ -113,20 +113,22 @@
 l Block 
-from
+before
 ;%0A    pr
@@ -145,18 +145,21 @@
 l Block 
-to
+after
 ;%0A%0A    p
@@ -186,20 +186,22 @@
 ock 
-from
+before
 , Block 
 to) 
@@ -196,18 +196,21 @@
 , Block 
-to
+after
 ) %7B%0A    
@@ -222,19 +222,23 @@
 his.
-from = from
+before = before
 ;%0A  
@@ -252,15 +252,21 @@
 his.
-to = to
+after = after
 ;%0A  
@@ -294,12 +294,14 @@
  get
-From
+Before
 () %7B
@@ -316,20 +316,22 @@
  return 
-from
+before
 ;%0A    %7D%0A
@@ -355,10 +355,13 @@
  get
-To
+After
 () %7B
@@ -376,18 +376,21 @@
  return 
-to
+after
 ;%0A    %7D%0A
@@ -604,20 +604,22 @@
    if (!
-from
+before
 .equals(
@@ -623,20 +623,22 @@
 ls(that.
-from
+before
 )) retur
@@ -661,18 +661,21 @@
  return 
-to
+after
 .equals(
@@ -679,18 +679,21 @@
 ls(that.
-to
+after
 );%0A%0A    
@@ -758,20 +758,22 @@
 esult = 
-from
+before
 .hashCod
@@ -808,18 +808,21 @@
 esult + 
-to
+after
 .hashCod
@@ -954,21 +954,25 @@
    %22
-from=%22 + from
+before=%22 + before
  +%0A 
@@ -993,17 +993,23 @@
  %22, 
-to=%22 + to
+after=%22 + after
  +%0A 

Rename from/to -> before/after