org.jrubyparser.util.diff
Class Change

java.lang.Object
  extended by org.jrubyparser.util.diff.Change
Direct Known Subclasses:
DeepDiff

public class Change
extends Object


Constructor Summary
Change(Node newNode, int newCost, Node oldNode, int oldCost)
          Each changed node in the diff is represented by a Change object.
 
Method Summary
 int getNewCost()
           
 Node getNewNode()
           
 int getOldCost()
           
 Node getOldNode()
           
 int getTotalCost()
           
 void setNewCost(int newCost)
           
 void setNewNode(Node newNode)
           
 void setOldCost(int oldCost)
           
 void setOldNode(Node oldNode)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Change

public Change(Node newNode,
              int newCost,
              Node oldNode,
              int oldCost)
Each changed node in the diff is represented by a Change object. It should hold enough information to locate the change, and determine whether the change was an insertion, deletion or modification.

Parameters:
newNode - the new version of the node
newCost - the complexity/depth of the node that was changed
oldNode - the old version of the node
oldCost - the complexity/depth of the original node
Method Detail

setNewNode

public final void setNewNode(Node newNode)

setOldNode

public final void setOldNode(Node oldNode)

setNewCost

public final void setNewCost(int newCost)

setOldCost

public final void setOldCost(int oldCost)

getOldNode

public Node getOldNode()

getNewNode

public Node getNewNode()

getOldCost

public int getOldCost()

getNewCost

public int getNewCost()

getTotalCost

public int getTotalCost()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.