org.test4j.hamcrest.matcher.property.comparator
类 IgnoreDefaultsComparator

java.lang.Object
  继承者 org.test4j.hamcrest.matcher.property.comparator.IgnoreDefaultsComparator
所有已实现的接口:
Comparator

public class IgnoreDefaultsComparator
extends Object
implements Comparator

A comparator that filters out java-defaults. If the left object is null, false or 0, both objects are considered equal. This implements the IGNORE_DEFAULTS comparison mode.


构造方法摘要
IgnoreDefaultsComparator()
           
 
方法摘要
 boolean canCompare(Object left, Object right)
          Returns true if the left object is a java default
 Difference compare(Object left, Object right, boolean onlyFirstDifference, ReflectionComparator reflectionComparator)
          Always returns null: both objects are equal.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

IgnoreDefaultsComparator

public IgnoreDefaultsComparator()
方法详细信息

canCompare

public boolean canCompare(Object left,
                          Object right)
Returns true if the left object is a java default

指定者:
接口 Comparator 中的 canCompare
参数:
left - The left object
right - The right object
返回:
True if left is null, false or 0

compare

public Difference compare(Object left,
                          Object right,
                          boolean onlyFirstDifference,
                          ReflectionComparator reflectionComparator)
Always returns null: both objects are equal.

指定者:
接口 Comparator 中的 compare
参数:
left - The left object
right - The right object
onlyFirstDifference - True if only the first difference should be returned
reflectionComparator - The root comparator for inner comparisons, not null
返回:
null


Copyright © 2013. All rights reserved.