Top Description Fields Constructors Methods
org.assertj.core.util.diff.myers

public abstract Class PathNode

extends Object
Class Inheritance
Known Direct Subclasses
org.assertj.core.util.diff.myers.Snake, org.assertj.core.util.diff.myers.DiffNode

Copy from https://code.google.com/p/java-diff-utils/.

A node in a diffpath.

Author
Juanco Anez
See Also
DiffNode, Snake

Field Summary

Modifier and TypeField and Description
public final int
i

Position in the original sequence.

public final int
j

Position in the revised sequence.

public final PathNode
prev

The previous node in the path.

Constructor Summary

AccessConstructor and Description
public
PathNode(int
The position in the original sequence for the new node.
i
,
int
The position in the revised sequence for the new node.
j
,
PathNode
The previous node in the path.
prev
)

Concatenates a new path node with an existing diffpath.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

tru if this is a bootstrap node.
isBootstrap
()

Is this a bootstrap node?

public abstract boolean

Returns:

true if this is a Snake node
isSnake
()

Is this node a Snake node?

public final PathNode

Returns:

The next first Snake or bootstrap node in the path, or null if none found.
previousSnake
()

Skips sequences of DiffNodes until a Snake or bootstrap node is found, or the end of the path is reached.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

iback to summary
public final int i

Position in the original sequence.

jback to summary
public final int j

Position in the revised sequence.

prevback to summary
public final PathNode prev

The previous node in the path.

Constructor Detail

PathNodeback to summary
public PathNode(int i, int j, PathNode prev)

Concatenates a new path node with an existing diffpath.

Parameters
i:int

The position in the original sequence for the new node.

j:int

The position in the revised sequence for the new node.

prev:PathNode

The previous node in the path.

Method Detail

isBootstrapback to summary
public boolean isBootstrap()

Is this a bootstrap node?

In bootstrap nodes one of the two coordinates is less than zero.

Returns:boolean

tru if this is a bootstrap node.

isSnakeback to summary
public abstract boolean isSnake()

Is this node a Snake node?

Returns:boolean

true if this is a Snake node

previousSnakeback to summary
public final PathNode previousSnake()

Skips sequences of DiffNodes until a Snake or bootstrap node is found, or the end of the path is reached.

Returns:PathNode

The next first Snake or bootstrap node in the path, or null if none found.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override