Class AllElementsEqualTo<V>
- java.lang.Object
-
- org.hamcrest.BaseMatcher<T>
-
- org.hamcrest.TypeSafeMatcher<Tensor<V>>
-
- org.tensorics.core.testing.hamcrest.AllElementsEqualTo<V>
-
- Type Parameters:
V
- the type of the values of the tensor
- All Implemented Interfaces:
org.hamcrest.Matcher<Tensor<V>>
,org.hamcrest.SelfDescribing
public class AllElementsEqualTo<V> extends org.hamcrest.TypeSafeMatcher<Tensor<V>>
This matcher checks, if all the values of the tensor are equal to one specific value. This value might aswell benull
, then then matcher would return true, only if all the elements also would benull
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <V> org.hamcrest.Matcher<Tensor<V>>
allElementsEqualTo(V value)
void
describeTo(org.hamcrest.Description description)
protected boolean
matchesSafely(Tensor<V> tensor)
-
Methods inherited from class org.hamcrest.TypeSafeMatcher
describeMismatch, describeMismatchSafely, matches
-
-
-
-
Method Detail
-
allElementsEqualTo
public static final <V> org.hamcrest.Matcher<Tensor<V>> allElementsEqualTo(V value)
-
describeTo
public void describeTo(org.hamcrest.Description description)
-
-