org.test4j.hamcrest.iassert.object.impl
类 NumberAssert<T extends Number & Comparable<T>,E extends INumberAssert<T,?>>

java.lang.Object
  继承者 ext.test4j.hamcrest.BaseMatcher<T>
      继承者 org.test4j.hamcrest.iassert.common.impl.Assert<T,E>
          继承者 org.test4j.hamcrest.iassert.common.impl.BaseAssert<T,E>
              继承者 org.test4j.hamcrest.iassert.common.impl.ListHasItemsAssert<T,E>
                  继承者 org.test4j.hamcrest.iassert.common.impl.ReflectionAssert<T,E>
                      继承者 org.test4j.hamcrest.iassert.common.impl.SizeAssert<T,E>
                          继承者 org.test4j.hamcrest.iassert.common.impl.ListAssert<T,E>
                              继承者 org.test4j.hamcrest.iassert.common.impl.AllAssert<T,E>
                                  继承者 org.test4j.hamcrest.iassert.common.impl.ComparableAssert<T,E>
                                      继承者 org.test4j.hamcrest.iassert.object.impl.NumberAssert<T,E>
所有已实现的接口:
Matcher<T>, SelfDescribing, IAssert<T,E>, IBaseAssert<T,E>, IComparableAssert<T,E>, IListAssert<T,E>, IListHasItemsAssert<E>, IReflectionAssert<E>, ISizedAssert<E>, INumberAssert<T,E>
直接已知子类:
DoubleAssert, FloatAssert, IntegerAssert, LongAssert, ShortAssert

public class NumberAssert<T extends Number & Comparable<T>,E extends INumberAssert<T,?>>
extends ComparableAssert<T,E>
implements INumberAssert<T,E>


嵌套类摘要
 
从类 org.test4j.hamcrest.iassert.common.impl.Assert 继承的嵌套类/接口
Assert.AssertType
 
字段摘要
 
从类 org.test4j.hamcrest.iassert.common.impl.Assert 继承的字段
assertClaz, link, the, type, value, valueClaz
 
构造方法摘要
NumberAssert(Class<? extends IAssert<?,?>> clazE)
           
NumberAssert(T value, Class<? extends IAssert<?,?>> clazE)
           
NumberAssert(T value, Class<? extends IAssert<?,?>> clazE, Class valueClazz)
           
 
方法摘要
 E isEqualTo(Number expected)
          因为IsEqual是基于equal比较值相等的,int和long即使值一样,equal也是不等的
这里把它们强制转换为同一种类型比较
 
从类 org.test4j.hamcrest.iassert.common.impl.ComparableAssert 继承的方法
isBetween, isGe, isGreaterEqual, isGreaterThan, isGt, isLe, isLessEqual, isLessThan, isLt
 
从类 org.test4j.hamcrest.iassert.common.impl.ListAssert 继承的方法
eqIgnoreOrder, isEqualTo, propertyEqMap, propertyMatch, reflectionEqMap, reflectionEqMap
 
从类 org.test4j.hamcrest.iassert.common.impl.SizeAssert 继承的方法
sizeBetween, sizeEq, sizeGe, sizeGt, sizeIs, sizeLe, sizeLt, sizeNe
 
从类 org.test4j.hamcrest.iassert.common.impl.ReflectionAssert 继承的方法
eqByReflect, eqIgnoreAll, eqIgnoreDefault, propertyEq, propertyEq, propertyEq, propertyEqMap, propertyMatch, reflectionEq, reflectionEqMap
 
从类 org.test4j.hamcrest.iassert.common.impl.ListHasItemsAssert 继承的方法
allItemsMatchAll, allItemsMatchAny, anyItemsMatchAll, anyItemsMatchAny, hasAllItems, hasAnyItems, hasItems, hasItems, match
 
从类 org.test4j.hamcrest.iassert.common.impl.BaseAssert 继承的方法
all, any, any, clazIs, clazIsSubFrom, eq, eqToString, eqToString, in, isEqualTo, isNull, isNull, not, notAll, notAny, notEqualTo, notIn, notNull, notNull, same, toStringAssert
 
从类 org.test4j.hamcrest.iassert.common.impl.Assert 继承的方法
assertThat, assertThat, describeTo, equals, getValueClaz, hashCode, matches, toString, wanted, wanted
 
从类 ext.test4j.hamcrest.BaseMatcher 继承的方法
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
从接口 org.test4j.hamcrest.iassert.common.intf.IBaseAssert 继承的方法
all, any, any, clazIs, clazIsSubFrom, eq, eqToString, eqToString, in, isEqualTo, isNull, isNull, not, notAll, notAny, notEqualTo, notIn, notNull, notNull, same
 
从接口 org.test4j.hamcrest.iassert.common.intf.IAssert 继承的方法
wanted, wanted
 
从接口 ext.test4j.hamcrest.Matcher 继承的方法
describeMismatch, matches
 
从接口 ext.test4j.hamcrest.SelfDescribing 继承的方法
describeTo
 
从接口 org.test4j.hamcrest.iassert.common.intf.IComparableAssert 继承的方法
isBetween, isGe, isGreaterEqual, isGreaterThan, isGt, isLe, isLessEqual, isLessThan, isLt
 
从接口 org.test4j.hamcrest.iassert.common.intf.ISizedAssert 继承的方法
sizeBetween, sizeEq, sizeGe, sizeGt, sizeIs, sizeLe, sizeLt, sizeNe
 

构造方法详细信息

NumberAssert

public NumberAssert(Class<? extends IAssert<?,?>> clazE)

NumberAssert

public NumberAssert(T value,
                    Class<? extends IAssert<?,?>> clazE)

NumberAssert

public NumberAssert(T value,
                    Class<? extends IAssert<?,?>> clazE,
                    Class valueClazz)
方法详细信息

isEqualTo

public E isEqualTo(Number expected)
因为IsEqual是基于equal比较值相等的,int和long即使值一样,equal也是不等的
这里把它们强制转换为同一种类型比较

指定者:
接口 IBaseAssert<T extends Number & Comparable<T>,E extends INumberAssert<T,?>> 中的 isEqualTo
指定者:
接口 INumberAssert<T extends Number & Comparable<T>,E extends INumberAssert<T,?>> 中的 isEqualTo
覆盖:
BaseAssert<T extends Number & Comparable<T>,E extends INumberAssert<T,?>> 中的 isEqualTo
参数:
expected - 期望值
返回:


Copyright © 2013. All rights reserved.