Top Description Fields Constructors Methods
org.easymock.internal.matchers

public Class ArrayEquals

extends Equals
Class Inheritance
Imports
java.util.Arrays, org.easymock.internal.ArgumentToString

Matches if the argument is an array where the elements are equal to the given array.
Author
OFFIS, Tammo Freese

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
ArrayEquals(Object expected)

Method Summary

Modifier and TypeMethod and Description
public void
appendTo(StringBuffer
the buffer to which the string representation is appended.
buffer
)

Overrides org.easymock.internal.matchers.Equals.appendTo.

Implements org.easymock.IArgumentMatcher.appendTo.

Appends a string representation of this matcher to the given buffer.
public boolean
matches(Object
the argument
actual
)

Overrides org.easymock.internal.matchers.Equals.matches.

Implements org.easymock.IArgumentMatcher.matches.

Returns whether this matcher accepts the given argument.
Inherited from org.easymock.internal.matchers.Equals:
equalsgetExpectedhashCode

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.easymock.internal.matchers.Equals.serialVersionUID.

Constructor Detail

ArrayEqualsback to summary
public ArrayEquals(Object expected)

Method Detail

appendToback to summary
public void appendTo(StringBuffer buffer)

Overrides org.easymock.internal.matchers.Equals.appendTo.

Implements org.easymock.IArgumentMatcher.appendTo.

Doc from org.easymock.IArgumentMatcher.appendTo.

Appends a string representation of this matcher to the given buffer. In case of failure, the printed message will show this string to allow to know which matcher was used for the failing call.

Parameters
buffer:StringBuffer

the buffer to which the string representation is appended.

Annotations
@Override
matchesback to summary
public boolean matches(Object actual)

Overrides org.easymock.internal.matchers.Equals.matches.

Implements org.easymock.IArgumentMatcher.matches.

Doc from org.easymock.IArgumentMatcher.matches.

Returns whether this matcher accepts the given argument.

Like Object.equals(), it should be aware that the argument passed might be null and of any type. So you will usually start the method with an instanceof and/or null check.

The method should never assert if the argument doesn't match. It should only return false. EasyMock will take care of asserting if the call is really unexpected.

Parameters
actual:Object

the argument

Returns:boolean

whether this matcher accepts the given argument.

Annotations
@Override