Top Fields Constructors Methods
org.hamcrest.core

pack-priv abstract Class ShortcutCombination<T>

extends BaseMatcher<T>
Class Inheritance
Known Direct Subclasses
org.hamcrest.core.AnyOf
Imports
org.hamcrest.BaseMatcher, .Description, .Matcher

Field Summary

Modifier and TypeField and Description
private final Iterable<Matcher<? super T>>

Constructor Summary

AccessConstructor and Description
public
ShortcutCombination(Iterable<Matcher<? super T>> matchers)

Method Summary

Modifier and TypeMethod and Description
public abstract void
describeTo(Description
The description to be built or appended to.
description
)

Redeclares org.hamcrest.SelfDescribing.describeTo.

Generates a description of the object.
public void
describeTo(Description description, String operator)

public abstract boolean
matches(Object
the object against which the matcher is evaluated.
o
)

Redeclares org.hamcrest.Matcher.matches.

Evaluates the matcher for argument item.
protected boolean
matches(Object o, boolean shortcut)

Inherited from org.hamcrest.BaseMatcher:
_dont_implement_Matcher___instead_extend_BaseMatcher_describeMismatchtoString

Field Detail

matchersback to summary
private final Iterable<Matcher<? super T>> matchers

Constructor Detail

ShortcutCombinationback to summary
public ShortcutCombination(Iterable<Matcher<? super T>> matchers)

Method Detail

describeToback to summary
public abstract void describeTo(Description description)

Redeclares org.hamcrest.SelfDescribing.describeTo.

Doc from org.hamcrest.SelfDescribing.describeTo.

Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.

Parameters
description:Description

The description to be built or appended to.

Annotations
@Override
describeToback to summary
public void describeTo(Description description, String operator)
matchesback to summary
public abstract boolean matches(Object o)

Redeclares org.hamcrest.Matcher.matches.

Doc from org.hamcrest.Matcher.matches.

Evaluates the matcher for argument item.

This method matches against Object, instead of the generic type T. This is because the caller of the Matcher does not know at runtime what the type is (because of type erasure with Java generics). It is down to the implementations to check the correct type.

Parameters
o:Object

the object against which the matcher is evaluated.

Returns:boolean

true if item matches, otherwise false.

Annotations
@Override
matchesback to summary
protected boolean matches(Object o, boolean shortcut)