Package org.hamcrest.core
Class IsAnything<T>
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.core.IsAnything<T>
- Type Parameters:
T
- the matched value type
- All Implemented Interfaces:
Matcher<T>
,SelfDescribing
A matcher that always returns
true
.-
Constructor Summary
ConstructorDescriptionConstructor, best called fromanything()
.IsAnything
(String message) Constructor, best called fromanything(String)
. -
Method Summary
Modifier and TypeMethodDescriptionanything()
Creates a matcher that always matches, regardless of the examined object.Creates a matcher that always matches, regardless of the examined object, but describes itself with the specifiedString
.void
describeTo
(Description description) Generates a description of the object.boolean
Always returns true.Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, isNotNull, toString
-
Constructor Details
-
IsAnything
public IsAnything()Constructor, best called fromanything()
. -
IsAnything
Constructor, best called fromanything(String)
.- Parameters:
message
- matcher description
-
-
Method Details
-
matches
Always returns true.- Parameters:
o
- the object against which the matcher is evaluated.- Returns:
- true
- See Also:
-
describeTo
Description copied from interface:SelfDescribing
Generates a description of the object. The description may be part of a description of a larger object of which this is just a component, so it should be worded appropriately.- Parameters:
description
- The description to be built or appended to.
-
anything
Creates a matcher that always matches, regardless of the examined object.- Returns:
- The matcher.
-
anything
Creates a matcher that always matches, regardless of the examined object, but describes itself with the specifiedString
.- Parameters:
description
- a meaningfulString
used when describing itself- Returns:
- The matcher.
-