Top Description Fields Constructors Methods
org.easymock.bytebuddy.matcher

public Class CollectionSizeMatcher<T extends Iterable<?>>

extends ElementMatcher.Junction.ForNonNullValues<T extends Iterable<?>>
Class Inheritance
Annotations
@Enhance
Type Parameters
<T>
The type of the matched entity.
Imports
edu.umd.cs.findbugs.annotations.SuppressFBWarnings, org.easymock.bytebuddy.build.HashCodeAndEqualsPlugin, java.util.Collection

An element matcher that matches a collection by its size.

Field Summary

Modifier and TypeField and Description
private final int
size

The expected size of the matched collection.

Constructor Summary

AccessConstructor and Description
public
CollectionSizeMatcher(int
The expected size of the matched collection.
size
)

Creates a new matcher that matches the size of a matched collection.

Method Summary

Modifier and TypeMethod and Description
protected boolean
doMatch(T
The instance to be matched.
target
)

Implements abstract org.easymock.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues.doMatch.

Matches the supplied value if it was found not to be null.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.easymock.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues:
matches

Field Detail

sizeback to summary
private final int size

The expected size of the matched collection.

Constructor Detail

CollectionSizeMatcherback to summary
public CollectionSizeMatcher(int size)

Creates a new matcher that matches the size of a matched collection.

Parameters
size:int

The expected size of the matched collection.

Method Detail

doMatchback to summary
protected boolean doMatch(T target)

Implements abstract org.easymock.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues.doMatch.

Doc from org.easymock.bytebuddy.matcher.ElementMatcher.Junction.ForNonNullValues.doMatch.

Matches the supplied value if it was found not to be null.

Parameters
target:T

The instance to be matched.

Returns:boolean

true if the given element is matched by this matcher or false otherwise.

Annotations
@SuppressFBWarnings:DLS_DEAD_LOCAL_STORE
justification:Iteration required to count size of an iterable.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override