org.test4j.hamcrest.matcher.property.difference
类 Difference

java.lang.Object
  继承者 org.test4j.hamcrest.matcher.property.difference.Difference
直接已知子类:
ClassDifference, CollectionDifference, MapDifference, ObjectDifference, UnorderedCollectionDifference

public class Difference
extends Object

A class for holding the difference between two objects.


构造方法摘要
Difference(String message, Object leftValue, Object rightValue)
          Creates a difference.
 
方法摘要
<T,A> T
accept(DifferenceVisitor<T,A> visitor, A argument)
          Double dispatch method.
 Object getLeftValue()
          Gets the left value.
 String getMessage()
          Gets the message indicating the kind of difference.
 Object getRightValue()
          Gets the right value.
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

Difference

public Difference(String message,
                  Object leftValue,
                  Object rightValue)
Creates a difference.

参数:
message - a message describing the difference
leftValue - the left instance
rightValue - the right instance
方法详细信息

getLeftValue

public Object getLeftValue()
Gets the left value.

返回:
the value

getRightValue

public Object getRightValue()
Gets the right value.

返回:
the value

getMessage

public String getMessage()
Gets the message indicating the kind of difference.

返回:
the message

accept

public <T,A> T accept(DifferenceVisitor<T,A> visitor,
                      A argument)
Double dispatch method. Dispatches back to the given visitor.

All subclasses should copy this method in their own class body.

参数:
visitor - The visitor, not null
argument - An optional argument for the visitor, null if not applicable
返回:
The result

toString

public String toString()
覆盖:
Object 中的 toString


Copyright © 2013. All rights reserved.