diff --git a/docs/javadoc/2.1/allclasses-frame.html b/docs/javadoc/2.1/allclasses-frame.html new file mode 100644 index 00000000..e92aacf7 --- /dev/null +++ b/docs/javadoc/2.1/allclasses-frame.html @@ -0,0 +1,102 @@ + + + + + +All Classes (Hamcrest 2.1 API) + + + + + +

All Classes

+
+ +
+ + diff --git a/docs/javadoc/2.1/allclasses-noframe.html b/docs/javadoc/2.1/allclasses-noframe.html new file mode 100644 index 00000000..f19f045f --- /dev/null +++ b/docs/javadoc/2.1/allclasses-noframe.html @@ -0,0 +1,102 @@ + + + + + +All Classes (Hamcrest 2.1 API) + + + + + +

All Classes

+
+ +
+ + diff --git a/docs/javadoc/2.1/constant-values.html b/docs/javadoc/2.1/constant-values.html new file mode 100644 index 00000000..cba88bac --- /dev/null +++ b/docs/javadoc/2.1/constant-values.html @@ -0,0 +1,122 @@ + + + + + +Constant Field Values (Hamcrest 2.1 API) + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + +
+

Constant Field Values

+

Contents

+
+ +
+ + +
Skip navigation links
+ + + + +
+ + + + diff --git a/docs/javadoc/2.1/deprecated-list.html b/docs/javadoc/2.1/deprecated-list.html new file mode 100644 index 00000000..98c50cd4 --- /dev/null +++ b/docs/javadoc/2.1/deprecated-list.html @@ -0,0 +1,290 @@ + + + + + +Deprecated List (Hamcrest 2.1 API) + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + +
+

Deprecated API

+

Contents

+ +
+
+ + + + + + + +
+ +
+ + +
Skip navigation links
+ + + + +
+ + + + diff --git a/docs/javadoc/2.1/help-doc.html b/docs/javadoc/2.1/help-doc.html new file mode 100644 index 00000000..09176b9b --- /dev/null +++ b/docs/javadoc/2.1/help-doc.html @@ -0,0 +1,223 @@ + + + + + +API Help (Hamcrest 2.1 API) + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+ +This help file applies to API documentation generated using the standard doclet.
+ +
+ + +
Skip navigation links
+ + + + +
+ + + + diff --git a/docs/javadoc/2.1/index-all.html b/docs/javadoc/2.1/index-all.html new file mode 100644 index 00000000..552cf009 --- /dev/null +++ b/docs/javadoc/2.1/index-all.html @@ -0,0 +1,2768 @@ + + + + + +Index (Hamcrest 2.1 API) + + + + + + + + +
+ + +
Skip navigation links
+ + + + +
+ + +
A B C D E F G H I L M N O P R S T U _  + + +

A

+
+
aFileNamed(Matcher<String>) - Static method in class org.hamcrest.io.FileMatchers
+
 
+
aFileWithAbsolutePath(Matcher<String>) - Static method in class org.hamcrest.io.FileMatchers
+
 
+
aFileWithCanonicalPath(Matcher<String>) - Static method in class org.hamcrest.io.FileMatchers
+
 
+
aFileWithSize(long) - Static method in class org.hamcrest.io.FileMatchers
+
 
+
aFileWithSize(Matcher<Long>) - Static method in class org.hamcrest.io.FileMatchers
+
 
+
AllOf<T> - Class in org.hamcrest.core
+
+
Calculates the logical conjunction of multiple matchers.
+
+
AllOf(Iterable<Matcher<? super T>>) - Constructor for class org.hamcrest.core.AllOf
+
 
+
allOf(Iterable<Matcher<? super T>>) - Static method in class org.hamcrest.core.AllOf
+
+
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
+
+
allOf(Matcher<? super T>...) - Static method in class org.hamcrest.core.AllOf
+
+
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
+
+
allOf(Iterable<Matcher<? super T>>) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
+
+
allOf(Matcher<? super T>...) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
+
+
allOf(Iterable<Matcher<? super T>>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
+
+
allOf(Matcher<? super T>...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
+
+
allOf(Matcher<? super T>, Matcher<? super T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
+
+
allOf(Matcher<? super T>, Matcher<? super T>, Matcher<? super T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
+
+
allOf(Matcher<? super T>, Matcher<? super T>, Matcher<? super T>, Matcher<? super T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
+
+
allOf(Matcher<? super T>, Matcher<? super T>, Matcher<? super T>, Matcher<? super T>, Matcher<? super T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
+
+
allOf(Matcher<? super T>, Matcher<? super T>, Matcher<? super T>, Matcher<? super T>, Matcher<? super T>, Matcher<? super T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ALL of the specified matchers.
+
+
aMapWithSize(Matcher<? super Integer>) - Static method in class org.hamcrest.collection.IsMapWithSize
+
+
Creates a matcher for Maps that matches when the size() method returns + a value that satisfies the specified matcher.
+
+
aMapWithSize(int) - Static method in class org.hamcrest.collection.IsMapWithSize
+
+
Creates a matcher for Maps that matches when the size() method returns + a value equal to the specified size.
+
+
aMapWithSize(Matcher<? super Integer>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Maps that matches when the size() method returns + a value that satisfies the specified matcher.
+
+
aMapWithSize(int) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Maps that matches when the size() method returns + a value equal to the specified size.
+
+
and(Condition.Step<? super T, U>) - Method in class org.hamcrest.Condition
+
 
+
and(Matcher<? super T>) - Method in class org.hamcrest.core.CombinableMatcher
+
 
+
and(Matcher<? super X>) - Method in class org.hamcrest.core.CombinableMatcher.CombinableBothMatcher
+
 
+
anEmptyMap() - Static method in class org.hamcrest.collection.IsMapWithSize
+
+
Creates a matcher for Maps that matches when the size() method returns + zero.
+
+
anEmptyMap() - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Maps that matches when the size() method returns + zero.
+
+
anExistingDirectory() - Static method in class org.hamcrest.io.FileMatchers
+
 
+
anExistingFile() - Static method in class org.hamcrest.io.FileMatchers
+
 
+
anExistingFileOrDirectory() - Static method in class org.hamcrest.io.FileMatchers
+
 
+
any(Class<T>) - Static method in class org.hamcrest.core.IsInstanceOf
+
+
Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object.
+
+
any(Class<T>) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object.
+
+
any(Class<T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object.
+
+
AnyOf<T> - Class in org.hamcrest.core
+
+
Calculates the logical disjunction of multiple matchers.
+
+
AnyOf(Iterable<Matcher<? super T>>) - Constructor for class org.hamcrest.core.AnyOf
+
 
+
anyOf(Iterable<Matcher<? super T>>) - Static method in class org.hamcrest.core.AnyOf
+
+
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
+
+
anyOf(Matcher<? super T>...) - Static method in class org.hamcrest.core.AnyOf
+
+
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
+
+
anyOf(Iterable<Matcher<? super T>>) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
+
+
anyOf(Matcher<? super T>...) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
+
+
anyOf(Iterable<Matcher<? super T>>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
+
+
anyOf(Matcher<? super T>...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
+
+
anyOf(Matcher<T>, Matcher<? super T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
+
+
anyOf(Matcher<T>, Matcher<? super T>, Matcher<? super T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
+
+
anyOf(Matcher<T>, Matcher<? super T>, Matcher<? super T>, Matcher<? super T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
+
+
anyOf(Matcher<T>, Matcher<? super T>, Matcher<? super T>, Matcher<? super T>, Matcher<? super T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
+
+
anyOf(Matcher<T>, Matcher<? super T>, Matcher<? super T>, Matcher<? super T>, Matcher<? super T>, Matcher<? super T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined object matches ANY of the specified matchers.
+
+
anything() - Static method in class org.hamcrest.core.IsAnything
+
+
Creates a matcher that always matches, regardless of the examined object.
+
+
anything(String) - Static method in class org.hamcrest.core.IsAnything
+
+
Creates a matcher that always matches, regardless of the examined object, but describes + itself with the specified String.
+
+
anything() - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that always matches, regardless of the examined object.
+
+
anything(String) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that always matches, regardless of the examined object, but describes + itself with the specified String.
+
+
anything() - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that always matches, regardless of the examined object.
+
+
anything(String) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that always matches, regardless of the examined object, but describes + itself with the specified String.
+
+
append(String) - Method in class org.hamcrest.BaseDescription
+
+
Append the String str to the description.
+
+
append(char) - Method in class org.hamcrest.BaseDescription
+
+
Append the char c to the description.
+
+
append(String) - Method in class org.hamcrest.StringDescription
+
 
+
append(char) - Method in class org.hamcrest.StringDescription
+
 
+
appendDescriptionOf(SelfDescribing) - Method in class org.hamcrest.BaseDescription
+
 
+
appendDescriptionOf(SelfDescribing) - Method in interface org.hamcrest.Description
+
+
Appends the description of a SelfDescribing value to this description.
+
+
appendDescriptionOf(SelfDescribing) - Method in class org.hamcrest.Description.NullDescription
+
 
+
appendList(String, String, String, Iterable<? extends SelfDescribing>) - Method in class org.hamcrest.BaseDescription
+
 
+
appendList(String, String, String, Iterable<? extends SelfDescribing>) - Method in interface org.hamcrest.Description
+
+
Appends a list of SelfDescribing objects + to the description.
+
+
appendList(String, String, String, Iterable<? extends SelfDescribing>) - Method in class org.hamcrest.Description.NullDescription
+
 
+
appendText(String) - Method in class org.hamcrest.BaseDescription
+
 
+
appendText(String) - Method in interface org.hamcrest.Description
+
+
Appends some plain text to the description.
+
+
appendText(String) - Method in class org.hamcrest.Description.NullDescription
+
 
+
appendValue(Object) - Method in class org.hamcrest.BaseDescription
+
 
+
appendValue(Object) - Method in interface org.hamcrest.Description
+
+
Appends an arbitrary value to the description.
+
+
appendValue(Object) - Method in class org.hamcrest.Description.NullDescription
+
 
+
appendValueList(String, String, String, T...) - Method in class org.hamcrest.BaseDescription
+
 
+
appendValueList(String, String, String, Iterable<T>) - Method in class org.hamcrest.BaseDescription
+
 
+
appendValueList(String, String, String, T...) - Method in interface org.hamcrest.Description
+
+
Appends a list of values to the description.
+
+
appendValueList(String, String, String, Iterable<T>) - Method in interface org.hamcrest.Description
+
+
Appends a list of values to the description.
+
+
appendValueList(String, String, String, T...) - Method in class org.hamcrest.Description.NullDescription
+
 
+
appendValueList(String, String, String, Iterable<T>) - Method in class org.hamcrest.Description.NullDescription
+
 
+
apply(I, Description) - Method in interface org.hamcrest.Condition.Step
+
 
+
aReadableFile() - Static method in class org.hamcrest.io.FileMatchers
+
 
+
array(Matcher<? super T>...) - Static method in class org.hamcrest.collection.IsArray
+
+
Creates a matcher that matches arrays whose elements are satisfied by the specified matchers.
+
+
array(Matcher<? super T>...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches arrays whose elements are satisfied by the specified matchers.
+
+
ArrayAsIterableMatcher<E> - Class in org.hamcrest.collection
+
 
+
ArrayAsIterableMatcher(TypeSafeDiagnosingMatcher<Iterable<? extends E>>, Collection<Matcher<? super E>>, String) - Constructor for class org.hamcrest.collection.ArrayAsIterableMatcher
+
 
+
arrayContaining(E...) - Static method in class org.hamcrest.collection.ArrayMatching
+
+
Creates a matcher for arrays that matches when each item in the examined array is + logically equal to the corresponding item in the specified items.
+
+
arrayContaining(Matcher<? super E>...) - Static method in class org.hamcrest.collection.ArrayMatching
+
+
Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified matchers.
+
+
arrayContaining(List<Matcher<? super E>>) - Static method in class org.hamcrest.collection.ArrayMatching
+
+
Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified list of matchers.
+
+
arrayContaining(E...) - Static method in class org.hamcrest.collection.IsArrayContainingInOrder
+
+
Deprecated. + +
+
+
arrayContaining(Matcher<? super E>...) - Static method in class org.hamcrest.collection.IsArrayContainingInOrder
+
+
Deprecated. + +
+
+
arrayContaining(List<Matcher<? super E>>) - Static method in class org.hamcrest.collection.IsArrayContainingInOrder
+
+
Deprecated. +
As of version 2.1, use ArrayMatching.arrayContaining(List).
+
+
+
arrayContaining(E...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for arrays that matches when each item in the examined array is + logically equal to the corresponding item in the specified items.
+
+
arrayContaining(Matcher<? super E>...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified matchers.
+
+
arrayContaining(List<Matcher<? super E>>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified list of matchers.
+
+
arrayContainingInAnyOrder(Matcher<? super E>...) - Static method in class org.hamcrest.collection.ArrayMatching
+
+
+ Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified matchers.
+
+
arrayContainingInAnyOrder(Collection<Matcher<? super E>>) - Static method in class org.hamcrest.collection.ArrayMatching
+
+
+ Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified collection of matchers.
+
+
arrayContainingInAnyOrder(E...) - Static method in class org.hamcrest.collection.ArrayMatching
+
+
Creates an order agnostic matcher for arrays that matches when each item in the + examined array is logically equal to one item anywhere in the specified items.
+
+
arrayContainingInAnyOrder(Matcher<? super E>...) - Static method in class org.hamcrest.collection.IsArrayContainingInAnyOrder
+
+
Deprecated. + +
+
+
arrayContainingInAnyOrder(Collection<Matcher<? super E>>) - Static method in class org.hamcrest.collection.IsArrayContainingInAnyOrder
+
+
Deprecated. + +
+
+
arrayContainingInAnyOrder(E...) - Static method in class org.hamcrest.collection.IsArrayContainingInAnyOrder
+
+
Deprecated. + +
+
+
arrayContainingInAnyOrder(Matcher<? super E>...) - Static method in class org.hamcrest.Matchers
+
+
+ Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified matchers.
+
+
arrayContainingInAnyOrder(Collection<Matcher<? super E>>) - Static method in class org.hamcrest.Matchers
+
+
+ Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified collection of matchers.
+
+
arrayContainingInAnyOrder(E...) - Static method in class org.hamcrest.Matchers
+
+
Creates an order agnostic matcher for arrays that matches when each item in the + examined array is logically equal to one item anywhere in the specified items.
+
+
ArrayIterator - Class in org.hamcrest.internal
+
 
+
ArrayIterator(Object) - Constructor for class org.hamcrest.internal.ArrayIterator
+
 
+
ArrayMatching - Class in org.hamcrest.collection
+
 
+
ArrayMatching() - Constructor for class org.hamcrest.collection.ArrayMatching
+
 
+
arrayWithSize(Matcher<? super Integer>) - Static method in class org.hamcrest.collection.IsArrayWithSize
+
+
Creates a matcher for arrays that matches when the length of the array + satisfies the specified matcher.
+
+
arrayWithSize(int) - Static method in class org.hamcrest.collection.IsArrayWithSize
+
+
Creates a matcher for arrays that matches when the length of the array + equals the specified size.
+
+
arrayWithSize(Matcher<? super Integer>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for arrays that matches when the length of the array + satisfies the specified matcher.
+
+
arrayWithSize(int) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for arrays that matches when the length of the array + equals the specified size.
+
+
asEqualMatchers(E[]) - Static method in class org.hamcrest.collection.ArrayMatching
+
 
+
assertThat(T, Matcher<? super T>) - Static method in class org.hamcrest.MatcherAssert
+
 
+
assertThat(String, T, Matcher<? super T>) - Static method in class org.hamcrest.MatcherAssert
+
 
+
assertThat(String, boolean) - Static method in class org.hamcrest.MatcherAssert
+
 
+
asString(SelfDescribing) - Static method in class org.hamcrest.StringDescription
+
+ +
+
aWritableFile() - Static method in class org.hamcrest.io.FileMatchers
+
 
+
+ + + +

B

+
+
BaseDescription - Class in org.hamcrest
+
+
A Description that is stored as a string.
+
+
BaseDescription() - Constructor for class org.hamcrest.BaseDescription
+
 
+
BaseMatcher<T> - Class in org.hamcrest
+
+
BaseClass for all Matcher implementations.
+
+
BaseMatcher() - Constructor for class org.hamcrest.BaseMatcher
+
 
+
BigDecimalCloseTo - Class in org.hamcrest.number
+
 
+
BigDecimalCloseTo(BigDecimal, BigDecimal) - Constructor for class org.hamcrest.number.BigDecimalCloseTo
+
 
+
blankOrNullString() - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of String that matches when the examined string is null, or + contains zero or more whitespace characters and nothing else.
+
+
blankOrNullString() - Static method in class org.hamcrest.text.IsBlankString
+
+
Creates a matcher of String that matches when the examined string is null, or + contains zero or more whitespace characters and nothing else.
+
+
blankString() - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of String that matches when the examined string contains + zero or more whitespace characters and nothing else.
+
+
blankString() - Static method in class org.hamcrest.text.IsBlankString
+
+
Creates a matcher of String that matches when the examined string contains + zero or more whitespace characters and nothing else.
+
+
both(Matcher<? super LHS>) - Static method in class org.hamcrest.core.CombinableMatcher
+
+
Creates a matcher that matches when both of the specified matchers match the examined object.
+
+
both(Matcher<? super LHS>) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches when both of the specified matchers match the examined object.
+
+
both(Matcher<? super LHS>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches when both of the specified matchers match the examined object.
+
+
+ + + +

C

+
+
CAN_READ - Static variable in class org.hamcrest.io.FileMatchers
+
 
+
CAN_WRITE - Static variable in class org.hamcrest.io.FileMatchers
+
 
+
CharSequenceLength - Class in org.hamcrest.text
+
 
+
CharSequenceLength(Matcher<? super Integer>) - Constructor for class org.hamcrest.text.CharSequenceLength
+
 
+
check(File) - Method in interface org.hamcrest.io.FileMatchers.FileStatus
+
 
+
closeTo(double, double) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of Doubles that matches when an examined double is equal + to the specified operand, within a range of +/- error.
+
+
closeTo(BigDecimal, BigDecimal) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of BigDecimals that matches when an examined BigDecimal is equal + to the specified operand, within a range of +/- error.
+
+
closeTo(BigDecimal, BigDecimal) - Static method in class org.hamcrest.number.BigDecimalCloseTo
+
+
Creates a matcher of BigDecimals that matches when an examined BigDecimal is equal + to the specified operand, within a range of +/- error.
+
+
closeTo(double, double) - Static method in class org.hamcrest.number.IsCloseTo
+
+
Creates a matcher of Doubles that matches when an examined double is equal + to the specified operand, within a range of +/- error.
+
+
CombinableBothMatcher(Matcher<? super X>) - Constructor for class org.hamcrest.core.CombinableMatcher.CombinableBothMatcher
+
 
+
CombinableEitherMatcher(Matcher<? super X>) - Constructor for class org.hamcrest.core.CombinableMatcher.CombinableEitherMatcher
+
 
+
CombinableMatcher<T> - Class in org.hamcrest.core
+
 
+
CombinableMatcher(Matcher<? super T>) - Constructor for class org.hamcrest.core.CombinableMatcher
+
 
+
CombinableMatcher.CombinableBothMatcher<X> - Class in org.hamcrest.core
+
 
+
CombinableMatcher.CombinableEitherMatcher<X> - Class in org.hamcrest.core
+
 
+
ComparatorMatcherBuilder<T> - Class in org.hamcrest.comparator
+
 
+
comparedBy(Comparator<T>) - Static method in class org.hamcrest.comparator.ComparatorMatcherBuilder
+
+
Creates a matcher factory for matchers of Comparatorss of T.
+
+
comparesEqualTo(T) - Method in class org.hamcrest.comparator.ComparatorMatcherBuilder
+
+
Creates a matcher of T object that matches when the examined object is + equal to the specified value, as reported by the Comparator used to + create this builder.
+
+
comparesEqualTo(T) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of Comparable object that matches when the examined object is + equal to the specified value, as reported by the compareTo method of the + examined object.
+
+
comparesEqualTo(T) - Static method in class org.hamcrest.number.OrderingComparison
+
+
Creates a matcher of Comparable object that matches when the examined object is + equal to the specified value, as reported by the compareTo method of the + examined object.
+
+
Condition<T> - Class in org.hamcrest
+
+
A Condition implements part of a multi-step match.
+
+
Condition.Step<I,O> - Interface in org.hamcrest
+
 
+
contains(E...) - Static method in class org.hamcrest.collection.IsIterableContainingInOrder
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each logically equal to the + corresponding item in the specified items.
+
+
contains(Matcher<? super E>) - Static method in class org.hamcrest.collection.IsIterableContainingInOrder
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a single item that satisfies the specified matcher.
+
+
contains(Matcher<? super E>...) - Static method in class org.hamcrest.collection.IsIterableContainingInOrder
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each satisfying the corresponding + matcher in the specified matchers.
+
+
contains(List<Matcher<? super E>>) - Static method in class org.hamcrest.collection.IsIterableContainingInOrder
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each satisfying the corresponding + matcher in the specified list of matchers.
+
+
contains(E...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each logically equal to the + corresponding item in the specified items.
+
+
contains(Matcher<? super E>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a single item that satisfies the specified matcher.
+
+
contains(Matcher<? super E>...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each satisfying the corresponding + matcher in the specified matchers.
+
+
contains(List<Matcher<? super E>>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each satisfying the corresponding + matcher in the specified list of matchers.
+
+
containsInAnyOrder(Matcher<? super T>...) - Static method in class org.hamcrest.collection.IsIterableContainingInAnyOrder
+
+
+ Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each satisfying one matcher anywhere + in the specified matchers.
+
+
containsInAnyOrder(T...) - Static method in class org.hamcrest.collection.IsIterableContainingInAnyOrder
+
+
+ Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each logically equal to one item + anywhere in the specified items.
+
+
containsInAnyOrder(Collection<Matcher<? super T>>) - Static method in class org.hamcrest.collection.IsIterableContainingInAnyOrder
+
+
+ Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each satisfying one matcher anywhere + in the specified collection of matchers.
+
+
containsInAnyOrder(Matcher<? super T>...) - Static method in class org.hamcrest.Matchers
+
+
+ Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each satisfying one matcher anywhere + in the specified matchers.
+
+
containsInAnyOrder(T...) - Static method in class org.hamcrest.Matchers
+
+
+ Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each logically equal to one item + anywhere in the specified items.
+
+
containsInAnyOrder(Collection<Matcher<? super T>>) - Static method in class org.hamcrest.Matchers
+
+
+ Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each satisfying one matcher anywhere + in the specified collection of matchers.
+
+
containsInRelativeOrder(E...) - Static method in class org.hamcrest.collection.IsIterableContainingInRelativeOrder
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that contains items logically equal to the + corresponding item in the specified items, in the same relative order + For example:
+
+
containsInRelativeOrder(Matcher<? super E>...) - Static method in class org.hamcrest.collection.IsIterableContainingInRelativeOrder
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that each satisfying the corresponding + matcher in the specified matchers, in the same relative order.
+
+
containsInRelativeOrder(List<Matcher<? super E>>) - Static method in class org.hamcrest.collection.IsIterableContainingInRelativeOrder
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that contains items satisfying the corresponding + matcher in the specified list of matchers, in the same relative order.
+
+
containsInRelativeOrder(E...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that contains items logically equal to the + corresponding item in the specified items, in the same relative order + For example:
+
+
containsInRelativeOrder(Matcher<? super E>...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that each satisfying the corresponding + matcher in the specified matchers, in the same relative order.
+
+
containsInRelativeOrder(List<Matcher<? super E>>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that contains items satisfying the corresponding + matcher in the specified list of matchers, in the same relative order.
+
+
containsString(String) - Static method in class org.hamcrest.core.StringContains
+
+
Creates a matcher that matches if the examined String contains the specified + String anywhere.
+
+
containsString(String) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches if the examined String contains the specified + String anywhere.
+
+
containsString(String) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined String contains the specified + String anywhere.
+
+
containsStringIgnoringCase(String) - Static method in class org.hamcrest.core.StringContains
+
+
Creates a matcher that matches if the examined String contains the specified + String anywhere, ignoring case.
+
+
containsStringIgnoringCase(String) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches if the examined String contains the specified + String anywhere, ignoring case.
+
+
containsStringIgnoringCase(String) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined String contains the specified + String anywhere, ignoring case.
+
+
converted(String) - Method in class org.hamcrest.core.SubstringMatcher
+
 
+
CoreMatchers - Class in org.hamcrest
+
 
+
CoreMatchers() - Constructor for class org.hamcrest.CoreMatchers
+
 
+
CustomMatcher<T> - Class in org.hamcrest
+
+
Utility class for writing one off matchers.
+
+
CustomMatcher(String) - Constructor for class org.hamcrest.CustomMatcher
+
 
+
CustomTypeSafeMatcher<T> - Class in org.hamcrest
+
+
Utility class for writing one off matchers.
+
+
CustomTypeSafeMatcher(String) - Constructor for class org.hamcrest.CustomTypeSafeMatcher
+
 
+
+ + + +

D

+
+
DescribedAs<T> - Class in org.hamcrest.core
+
+
Provides a custom description to another matcher.
+
+
DescribedAs(String, Matcher<T>, Object[]) - Constructor for class org.hamcrest.core.DescribedAs
+
 
+
describedAs(String, Matcher<T>, Object...) - Static method in class org.hamcrest.core.DescribedAs
+
+
Wraps an existing matcher, overriding its description with that specified.
+
+
describedAs(String, Matcher<T>, Object...) - Static method in class org.hamcrest.CoreMatchers
+
+
Wraps an existing matcher, overriding its description with that specified.
+
+
describedAs(String, Matcher<T>, Object...) - Static method in class org.hamcrest.Matchers
+
+
Wraps an existing matcher, overriding its description with that specified.
+
+
describeMismatch(Object, Description) - Method in class org.hamcrest.BaseMatcher
+
 
+
describeMismatch(Object, Description) - Method in class org.hamcrest.core.DescribedAs
+
 
+
describeMismatch(Object, Description) - Method in class org.hamcrest.core.Is
+
 
+
describeMismatch(Object, Description) - Method in class org.hamcrest.DiagnosingMatcher
+
 
+
describeMismatch(Object, Description) - Method in interface org.hamcrest.Matcher
+
+
Generate a description of why the matcher has not accepted the item.
+
+
describeMismatch(Object, Description) - Method in class org.hamcrest.TypeSafeDiagnosingMatcher
+
 
+
describeMismatch(Object, Description) - Method in class org.hamcrest.TypeSafeMatcher
+
 
+
describeMismatchSafely(T, Description) - Method in class org.hamcrest.beans.HasProperty
+
 
+
describeMismatchSafely(E[], Description) - Method in class org.hamcrest.collection.ArrayAsIterableMatcher
+
 
+
describeMismatchSafely(T[], Description) - Method in class org.hamcrest.collection.HasItemInArray
+
 
+
describeMismatchSafely(T[], Description) - Method in class org.hamcrest.collection.IsArray
+
 
+
describeMismatchSafely(E[], Description) - Method in class org.hamcrest.collection.IsArrayContainingInAnyOrder
+
+
Deprecated.
+
describeMismatchSafely(E[], Description) - Method in class org.hamcrest.collection.IsArrayContainingInOrder
+
+
Deprecated.
+
describeMismatchSafely(Collection<? extends E>, Description) - Method in class org.hamcrest.collection.IsEmptyCollection
+
 
+
describeMismatchSafely(Iterable<? extends E>, Description) - Method in class org.hamcrest.collection.IsEmptyIterable
+
 
+
describeMismatchSafely(Map<? extends K, ? extends V>, Description) - Method in class org.hamcrest.collection.IsMapContaining
+
 
+
describeMismatchSafely(String, Description) - Method in class org.hamcrest.core.SubstringMatcher
+
 
+
describeMismatchSafely(BigDecimal, Description) - Method in class org.hamcrest.number.BigDecimalCloseTo
+
 
+
describeMismatchSafely(Double, Description) - Method in class org.hamcrest.number.IsCloseTo
+
 
+
describeMismatchSafely(Double, Description) - Method in class org.hamcrest.number.IsNaN
+
 
+
describeMismatchSafely(Class<?>, Description) - Method in class org.hamcrest.object.IsCompatibleType
+
 
+
describeMismatchSafely(String, Description) - Method in class org.hamcrest.text.IsEqualCompressingWhiteSpace
+
 
+
describeMismatchSafely(String, Description) - Method in class org.hamcrest.text.IsEqualIgnoringCase
+
 
+
describeMismatchSafely(String, Description) - Method in class org.hamcrest.text.StringContainsInOrder
+
 
+
describeMismatchSafely(T, Description) - Method in class org.hamcrest.TypeSafeMatcher
+
+
Subclasses should override this.
+
+
describeTo(Description) - Method in class org.hamcrest.beans.HasProperty
+
 
+
describeTo(Description) - Method in class org.hamcrest.beans.HasPropertyWithValue
+
 
+
describeTo(Description) - Method in class org.hamcrest.beans.SamePropertyValuesAs
+
 
+
describeTo(Description) - Method in class org.hamcrest.collection.ArrayAsIterableMatcher
+
 
+
describeTo(Description) - Method in class org.hamcrest.collection.HasItemInArray
+
 
+
describeTo(Description) - Method in class org.hamcrest.collection.IsArray
+
 
+
describeTo(Description) - Method in class org.hamcrest.collection.IsArrayContainingInAnyOrder
+
+
Deprecated.
+
describeTo(Description) - Method in class org.hamcrest.collection.IsArrayContainingInOrder
+
+
Deprecated.
+
describeTo(Description) - Method in class org.hamcrest.collection.IsEmptyCollection
+
 
+
describeTo(Description) - Method in class org.hamcrest.collection.IsEmptyIterable
+
 
+
describeTo(Description) - Method in class org.hamcrest.collection.IsIn
+
 
+
describeTo(Description) - Method in class org.hamcrest.collection.IsIterableContainingInAnyOrder
+
 
+
describeTo(Description) - Method in class org.hamcrest.collection.IsIterableContainingInOrder
+
 
+
describeTo(Description) - Method in class org.hamcrest.collection.IsIterableContainingInRelativeOrder
+
 
+
describeTo(Description) - Method in class org.hamcrest.collection.IsMapContaining
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.AllOf
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.AnyOf
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.CombinableMatcher
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.DescribedAs
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.Every
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.Is
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.IsAnything
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.IsCollectionContaining
+
+
Deprecated.
+
describeTo(Description) - Method in class org.hamcrest.core.IsEqual
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.IsInstanceOf
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.IsIterableContaining
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.IsNot
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.IsNull
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.IsSame
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.StringRegularExpression
+
 
+
describeTo(Description) - Method in class org.hamcrest.core.SubstringMatcher
+
 
+
describeTo(Description) - Method in class org.hamcrest.CustomMatcher
+
 
+
describeTo(Description) - Method in class org.hamcrest.CustomTypeSafeMatcher
+
 
+
describeTo(Description) - Method in class org.hamcrest.FeatureMatcher
+
 
+
describeTo(Description) - Method in class org.hamcrest.internal.SelfDescribingValue
+
 
+
describeTo(Description) - Method in class org.hamcrest.number.BigDecimalCloseTo
+
 
+
describeTo(Description) - Method in class org.hamcrest.number.IsCloseTo
+
 
+
describeTo(Description) - Method in class org.hamcrest.number.IsNaN
+
 
+
describeTo(Description) - Method in class org.hamcrest.object.HasEqualValues
+
 
+
describeTo(Description) - Method in class org.hamcrest.object.IsCompatibleType
+
 
+
describeTo(Description) - Method in class org.hamcrest.object.IsEventFrom
+
 
+
describeTo(Description) - Method in interface org.hamcrest.SelfDescribing
+
+
Generates a description of the object.
+
+
describeTo(Description) - Method in class org.hamcrest.text.IsBlankString
+
 
+
describeTo(Description) - Method in class org.hamcrest.text.IsEmptyString
+
 
+
describeTo(Description) - Method in class org.hamcrest.text.IsEqualCompressingWhiteSpace
+
 
+
describeTo(Description) - Method in class org.hamcrest.text.IsEqualIgnoringCase
+
 
+
describeTo(Description) - Method in class org.hamcrest.text.MatchesPattern
+
 
+
describeTo(Description) - Method in class org.hamcrest.text.StringContainsInOrder
+
 
+
describeTo(Description) - Method in class org.hamcrest.xml.HasXPath
+
 
+
Description - Interface in org.hamcrest
+
+
A description of a Matcher.
+
+
Description.NullDescription - Class in org.hamcrest
+
 
+
descriptionEnd() - Method in class org.hamcrest.collection.IsArray
+
+
Returns the string that ends the description.
+
+
descriptionSeparator() - Method in class org.hamcrest.collection.IsArray
+
+
Returns the string that separates the elements in the description.
+
+
descriptionStart() - Method in class org.hamcrest.collection.IsArray
+
+
Returns the string that starts the description.
+
+
DiagnosingMatcher<T> - Class in org.hamcrest
+
+
TODO(ngd): Document.
+
+
DiagnosingMatcher() - Constructor for class org.hamcrest.DiagnosingMatcher
+
 
+
+ + + +

E

+
+
either(Matcher<? super LHS>) - Static method in class org.hamcrest.core.CombinableMatcher
+
+
Creates a matcher that matches when either of the specified matchers match the examined object.
+
+
either(Matcher<? super LHS>) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches when either of the specified matchers match the examined object.
+
+
either(Matcher<? super LHS>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches when either of the specified matchers match the examined object.
+
+
empty() - Static method in class org.hamcrest.collection.IsEmptyCollection
+
+
Creates a matcher for Collections matching examined collections whose isEmpty + method returns true.
+
+
empty() - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Collections matching examined collections whose isEmpty + method returns true.
+
+
emptyArray() - Static method in class org.hamcrest.collection.IsArrayWithSize
+
+
Creates a matcher for arrays that matches when the length of the array + is zero.
+
+
emptyArray() - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for arrays that matches when the length of the array + is zero.
+
+
emptyCollectionOf(Class<E>) - Static method in class org.hamcrest.collection.IsEmptyCollection
+
+
Creates a matcher for Collections matching examined collections whose isEmpty + method returns true.
+
+
emptyCollectionOf(Class<E>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Collections matching examined collections whose isEmpty + method returns true.
+
+
emptyIterable() - Static method in class org.hamcrest.collection.IsEmptyIterable
+
+
Creates a matcher for Iterables matching examined iterables that yield no items.
+
+
emptyIterable() - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables matching examined iterables that yield no items.
+
+
emptyIterableOf(Class<E>) - Static method in class org.hamcrest.collection.IsEmptyIterable
+
+
Creates a matcher for Iterables matching examined iterables that yield no items.
+
+
emptyIterableOf(Class<E>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables matching examined iterables that yield no items.
+
+
emptyOrNullString() - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of String that matches when the examined string is null, or + has zero length.
+
+
emptyOrNullString() - Static method in class org.hamcrest.text.IsEmptyString
+
+
Creates a matcher of String that matches when the examined string is null, or + has zero length.
+
+
emptyString() - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of String that matches when the examined string has zero length.
+
+
emptyString() - Static method in class org.hamcrest.text.IsEmptyString
+
+
Creates a matcher of String that matches when the examined string has zero length.
+
+
endsWith(String) - Static method in class org.hamcrest.core.StringEndsWith
+
+
Creates a matcher that matches if the examined String ends with the specified + String.
+
+
endsWith(String) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches if the examined String ends with the specified + String.
+
+
endsWith(String) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined String ends with the specified + String.
+
+
endsWithIgnoringCase(String) - Static method in class org.hamcrest.core.StringEndsWith
+
+
Creates a matcher that matches if the examined String ends with the specified + String, ignoring case.
+
+
endsWithIgnoringCase(String) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches if the examined String ends with the specified + String, ignoring case.
+
+
endsWithIgnoringCase(String) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if the examined String ends with the specified + String, ignoring case.
+
+
equalTo(T) - Static method in class org.hamcrest.core.IsEqual
+
+
Creates a matcher that matches when the examined object is logically equal to the specified + operand, as determined by calling the Object.equals(java.lang.Object) method on + the examined object.
+
+
equalTo(T) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches when the examined object is logically equal to the specified + operand, as determined by calling the Object.equals(java.lang.Object) method on + the examined object.
+
+
equalTo(T) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches when the examined object is logically equal to the specified + operand, as determined by calling the Object.equals(java.lang.Object) method on + the examined object.
+
+
equalToCompressingWhiteSpace(String) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of String that matches when the examined string is equal to + the specified expectedString, when whitespace differences are (mostly) ignored.
+
+
equalToCompressingWhiteSpace(String) - Static method in class org.hamcrest.text.IsEqualCompressingWhiteSpace
+
+
Creates a matcher of String that matches when the examined string is equal to + the specified expectedString, when whitespace differences are (mostly) ignored.
+
+
equalToIgnoringCase(String) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of String that matches when the examined string is equal to + the specified expectedString, ignoring case.
+
+
equalToIgnoringCase(String) - Static method in class org.hamcrest.text.IsEqualIgnoringCase
+
+
Creates a matcher of String that matches when the examined string is equal to + the specified expectedString, ignoring case.
+
+
equalToIgnoringWhiteSpace(String) - Static method in class org.hamcrest.Matchers
+
+ +
+
equalToIgnoringWhiteSpace(String) - Static method in class org.hamcrest.text.IsEqualCompressingWhiteSpace
+
+ +
+
equalToObject(Object) - Static method in class org.hamcrest.core.IsEqual
+
+
Creates an IsEqual matcher that does not enforce the values being + compared to be of the same static type.
+
+
equalToObject(Object) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates an IsEqual matcher that does not enforce the values being + compared to be of the same static type.
+
+
equalToObject(Object) - Static method in class org.hamcrest.Matchers
+
+
Creates an IsEqual matcher that does not enforce the values being + compared to be of the same static type.
+
+
evalSubstringOf(String) - Method in class org.hamcrest.core.StringContains
+
 
+
evalSubstringOf(String) - Method in class org.hamcrest.core.StringEndsWith
+
 
+
evalSubstringOf(String) - Method in class org.hamcrest.core.StringStartsWith
+
 
+
evalSubstringOf(String) - Method in class org.hamcrest.core.SubstringMatcher
+
 
+
eventFrom(Class<? extends EventObject>, Object) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of EventObject that matches any object + derived from eventClass announced by source.
+
+
eventFrom(Object) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of EventObject that matches any EventObject + announced by source.
+
+
eventFrom(Class<? extends EventObject>, Object) - Static method in class org.hamcrest.object.IsEventFrom
+
+
Creates a matcher of EventObject that matches any object + derived from eventClass announced by source.
+
+
eventFrom(Object) - Static method in class org.hamcrest.object.IsEventFrom
+
+
Creates a matcher of EventObject that matches any EventObject + announced by source.
+
+
Every<T> - Class in org.hamcrest.core
+
 
+
Every(Matcher<? super T>) - Constructor for class org.hamcrest.core.Every
+
 
+
everyItem(Matcher<U>) - Static method in class org.hamcrest.core.Every
+
+
Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields items that are all matched by the specified + itemMatcher.
+
+
everyItem(Matcher<U>) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields items that are all matched by the specified + itemMatcher.
+
+
everyItem(Matcher<U>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields items that are all matched by the specified + itemMatcher.
+
+
EXISTS - Static variable in class org.hamcrest.io.FileMatchers
+
 
+
+ + + +

F

+
+
FeatureMatcher<T,U> - Class in org.hamcrest
+
+
Supporting class for matching a feature of an object.
+
+
FeatureMatcher(Matcher<? super U>, String, String) - Constructor for class org.hamcrest.FeatureMatcher
+
+
Constructor
+
+
featureValueOf(E[]) - Method in class org.hamcrest.collection.IsArrayWithSize
+
 
+
featureValueOf(Collection<? extends E>) - Method in class org.hamcrest.collection.IsCollectionWithSize
+
 
+
featureValueOf(Iterable<E>) - Method in class org.hamcrest.collection.IsIterableWithSize
+
 
+
featureValueOf(Map<? extends K, ? extends V>) - Method in class org.hamcrest.collection.IsMapWithSize
+
 
+
featureValueOf(T) - Method in class org.hamcrest.FeatureMatcher
+
+
Implement this to extract the interesting feature.
+
+
featureValueOf(T) - Method in class org.hamcrest.object.HasToString
+
 
+
featureValueOf(CharSequence) - Method in class org.hamcrest.text.CharSequenceLength
+
 
+
FileMatchers - Class in org.hamcrest.io
+
 
+
FileMatchers() - Constructor for class org.hamcrest.io.FileMatchers
+
 
+
FileMatchers.FileStatus - Interface in org.hamcrest.io
+
 
+
findExpectedType(Class<?>) - Method in class org.hamcrest.internal.ReflectiveTypeFinder
+
 
+
+ + + +

G

+
+
getPropertyDescriptor(String, Object) - Static method in class org.hamcrest.beans.PropertyUtil
+
+
Returns the description of the property with the provided + name on the provided object's interface.
+
+
greaterThan(T) - Method in class org.hamcrest.comparator.ComparatorMatcherBuilder
+
+
Creates a matcher of T object that matches when the examined object is + greater than the specified value, as reported by the Comparator used to + create this builder.
+
+
greaterThan(T) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of Comparable object that matches when the examined object is + greater than the specified value, as reported by the compareTo method of the + examined object.
+
+
greaterThan(T) - Static method in class org.hamcrest.number.OrderingComparison
+
+
Creates a matcher of Comparable object that matches when the examined object is + greater than the specified value, as reported by the compareTo method of the + examined object.
+
+
greaterThanOrEqualTo(T) - Method in class org.hamcrest.comparator.ComparatorMatcherBuilder
+
+
Creates a matcher of T object that matches when the examined object is + greater than or equal to the specified value, as reported by the Comparator used to + create this builder.
+
+
greaterThanOrEqualTo(T) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of Comparable object that matches when the examined object is + greater than or equal to the specified value, as reported by the compareTo method + of the examined object.
+
+
greaterThanOrEqualTo(T) - Static method in class org.hamcrest.number.OrderingComparison
+
+
Creates a matcher of Comparable object that matches when the examined object is + greater than or equal to the specified value, as reported by the compareTo method + of the examined object.
+
+
+ + + +

H

+
+
hasEntry(Matcher<? super K>, Matcher<? super V>) - Static method in class org.hamcrest.collection.IsMapContaining
+
+
Creates a matcher for Maps matching when the examined Map contains + at least one entry whose key satisfies the specified keyMatcher and whose + value satisfies the specified valueMatcher.
+
+
hasEntry(K, V) - Static method in class org.hamcrest.collection.IsMapContaining
+
+
Creates a matcher for Maps matching when the examined Map contains + at least one entry whose key equals the specified key and whose value equals the + specified value.
+
+
hasEntry(Matcher<? super K>, Matcher<? super V>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Maps matching when the examined Map contains + at least one entry whose key satisfies the specified keyMatcher and whose + value satisfies the specified valueMatcher.
+
+
hasEntry(K, V) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Maps matching when the examined Map contains + at least one entry whose key equals the specified key and whose value equals the + specified value.
+
+
HasEqualValues<T> - Class in org.hamcrest.object
+
 
+
HasEqualValues(T) - Constructor for class org.hamcrest.object.HasEqualValues
+
 
+
hasItem(Matcher<? super T>) - Static method in class org.hamcrest.core.IsCollectionContaining
+
+
Deprecated. + +
+
+
hasItem(T) - Static method in class org.hamcrest.core.IsCollectionContaining
+
+
Deprecated. +
As of version 2.1, use IsIterableContaining.hasItem(Object).
+
+
+
hasItem(Matcher<? super T>) - Static method in class org.hamcrest.core.IsIterableContaining
+
+
Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is matched by the specified + itemMatcher.
+
+
hasItem(T) - Static method in class org.hamcrest.core.IsIterableContaining
+
+
Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is equal to the specified + item.
+
+
hasItem(Matcher<? super T>) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is matched by the specified + itemMatcher.
+
+
hasItem(T) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is equal to the specified + item.
+
+
hasItem(Matcher<? super T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is matched by the specified + itemMatcher.
+
+
hasItem(T) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is equal to the specified + item.
+
+
hasItemInArray(Matcher<? super T>) - Static method in class org.hamcrest.collection.ArrayMatching
+
+
Creates a matcher for arrays that matches when the examined array contains at least one item + that is matched by the specified elementMatcher.
+
+
hasItemInArray(T) - Static method in class org.hamcrest.collection.ArrayMatching
+
+
A shortcut to the frequently used hasItemInArray(equalTo(x)).
+
+
HasItemInArray<T> - Class in org.hamcrest.collection
+
+
Matches if an array contains an item satisfying a nested matcher.
+
+
HasItemInArray(Matcher<? super T>) - Constructor for class org.hamcrest.collection.HasItemInArray
+
 
+
hasItemInArray(Matcher<? super T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for arrays that matches when the examined array contains at least one item + that is matched by the specified elementMatcher.
+
+
hasItemInArray(T) - Static method in class org.hamcrest.Matchers
+
+
A shortcut to the frequently used hasItemInArray(equalTo(x)).
+
+
hasItems(Matcher<? super T>...) - Static method in class org.hamcrest.core.IsCollectionContaining
+
+
Deprecated. + +
+
+
hasItems(T...) - Static method in class org.hamcrest.core.IsCollectionContaining
+
+
Deprecated. + +
+
+
hasItems(Matcher<? super T>...) - Static method in class org.hamcrest.core.IsIterableContaining
+
+
Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is matched by the corresponding + matcher from the specified itemMatchers.
+
+
hasItems(T...) - Static method in class org.hamcrest.core.IsIterableContaining
+
+
Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is equal to the corresponding + item from the specified items.
+
+
hasItems(Matcher<? super T>...) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is matched by the corresponding + matcher from the specified itemMatchers.
+
+
hasItems(T...) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is equal to the corresponding + item from the specified items.
+
+
hasItems(Matcher<? super T>...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is matched by the corresponding + matcher from the specified itemMatchers.
+
+
hasItems(T...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is equal to the corresponding + item from the specified items.
+
+
hasKey(Matcher<? super K>) - Static method in class org.hamcrest.collection.IsMapContaining
+
+
Creates a matcher for Maps matching when the examined Map contains + at least one key that satisfies the specified matcher.
+
+
hasKey(K) - Static method in class org.hamcrest.collection.IsMapContaining
+
+
Creates a matcher for Maps matching when the examined Map contains + at least one key that is equal to the specified key.
+
+
hasKey(Matcher<? super K>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Maps matching when the examined Map contains + at least one key that satisfies the specified matcher.
+
+
hasKey(K) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Maps matching when the examined Map contains + at least one key that is equal to the specified key.
+
+
hasLength(int) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of CharSequence that matches when a char sequence has the length + of the specified argument.
+
+
hasLength(int) - Static method in class org.hamcrest.text.CharSequenceLength
+
+
Creates a matcher of CharSequence that matches when a char sequence has the given length + For example:
+
+
hasLength(Matcher<? super Integer>) - Static method in class org.hamcrest.text.CharSequenceLength
+
+
Creates a matcher of CharSequence that matches when a char sequence has the given length + For example:
+
+
hasNext() - Method in class org.hamcrest.internal.ArrayIterator
+
 
+
hasNext() - Method in class org.hamcrest.internal.SelfDescribingValueIterator
+
 
+
HasProperty<T> - Class in org.hamcrest.beans
+
+
A Matcher that checks that an object has a JavaBean property + with the specified name.
+
+
HasProperty(String) - Constructor for class org.hamcrest.beans.HasProperty
+
 
+
hasProperty(String) - Static method in class org.hamcrest.beans.HasProperty
+
+
Creates a matcher that matches when the examined object has a JavaBean property + with the specified name.
+
+
hasProperty(String, Matcher<?>) - Static method in class org.hamcrest.beans.HasPropertyWithValue
+
+
Creates a matcher that matches when the examined object has a JavaBean property + with the specified name whose value satisfies the specified matcher.
+
+
hasProperty(String) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches when the examined object has a JavaBean property + with the specified name.
+
+
hasProperty(String, Matcher<?>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches when the examined object has a JavaBean property + with the specified name whose value satisfies the specified matcher.
+
+
hasPropertyAtPath(String, Matcher<T>) - Static method in class org.hamcrest.beans.HasPropertyWithValue
+
+
Creates a matcher that matches when the examined object is a graph of + JavaBean objects that can be navigated along the declared dot-separated path + and the final element of that path is a JavaBean property whose value satisfies the + specified matcher.
+
+
HasPropertyWithValue<T> - Class in org.hamcrest.beans
+
+
Matcher that asserts that a JavaBean property on an argument passed to the + mock object meets the provided matcher.
+
+
HasPropertyWithValue(String, Matcher<?>) - Constructor for class org.hamcrest.beans.HasPropertyWithValue
+
 
+
HasPropertyWithValue(String, Matcher<?>, String) - Constructor for class org.hamcrest.beans.HasPropertyWithValue
+
 
+
hasSize(Matcher<? super Integer>) - Static method in class org.hamcrest.collection.IsCollectionWithSize
+
+
Creates a matcher for Collections that matches when the size() method returns + a value that satisfies the specified matcher.
+
+
hasSize(int) - Static method in class org.hamcrest.collection.IsCollectionWithSize
+
+
Creates a matcher for Collections that matches when the size() method returns + a value equal to the specified size.
+
+
hasSize(Matcher<? super Integer>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Collections that matches when the size() method returns + a value that satisfies the specified matcher.
+
+
hasSize(int) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Collections that matches when the size() method returns + a value equal to the specified size.
+
+
hasToString(Matcher<? super String>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches any examined object whose toString method + returns a value that satisfies the specified matcher.
+
+
hasToString(String) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches any examined object whose toString method + returns a value equalTo the specified string.
+
+
HasToString<T> - Class in org.hamcrest.object
+
 
+
HasToString(Matcher<? super String>) - Constructor for class org.hamcrest.object.HasToString
+
 
+
hasToString(Matcher<? super String>) - Static method in class org.hamcrest.object.HasToString
+
+
Creates a matcher that matches any examined object whose toString method + returns a value that satisfies the specified matcher.
+
+
hasToString(String) - Static method in class org.hamcrest.object.HasToString
+
+
Creates a matcher that matches any examined object whose toString method + returns a value equalTo the specified string.
+
+
hasValue(Matcher<? super V>) - Static method in class org.hamcrest.collection.IsMapContaining
+
+
Creates a matcher for Maps matching when the examined Map contains + at least one value that satisfies the specified valueMatcher.
+
+
hasValue(V) - Static method in class org.hamcrest.collection.IsMapContaining
+
+
Creates a matcher for Maps matching when the examined Map contains + at least one value that is equal to the specified value.
+
+
hasValue(Matcher<? super V>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Maps matching when the examined Map contains + at least one value that satisfies the specified valueMatcher.
+
+
hasValue(V) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Maps matching when the examined Map contains + at least one value that is equal to the specified value.
+
+
hasXPath(String, Matcher<String>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of Nodes that matches when the examined node has a value at the + specified xPath that satisfies the specified valueMatcher.
+
+
hasXPath(String, NamespaceContext, Matcher<String>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of Nodes that matches when the examined node has a value at the + specified xPath, within the specified namespaceContext, that satisfies + the specified valueMatcher.
+
+
hasXPath(String) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of Nodes that matches when the examined node contains a node + at the specified xPath, with any content.
+
+
hasXPath(String, NamespaceContext) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of Nodes that matches when the examined node contains a node + at the specified xPath within the specified namespace context, with any content.
+
+
HasXPath - Class in org.hamcrest.xml
+
+
Applies a Matcher to a given XML Node in an existing XML Node tree, specified by an XPath expression.
+
+
HasXPath(String, Matcher<String>) - Constructor for class org.hamcrest.xml.HasXPath
+
 
+
HasXPath(String, NamespaceContext, Matcher<String>) - Constructor for class org.hamcrest.xml.HasXPath
+
 
+
hasXPath(String, Matcher<String>) - Static method in class org.hamcrest.xml.HasXPath
+
+
Creates a matcher of Nodes that matches when the examined node has a value at the + specified xPath that satisfies the specified valueMatcher.
+
+
hasXPath(String, NamespaceContext, Matcher<String>) - Static method in class org.hamcrest.xml.HasXPath
+
+
Creates a matcher of Nodes that matches when the examined node has a value at the + specified xPath, within the specified namespaceContext, that satisfies + the specified valueMatcher.
+
+
hasXPath(String) - Static method in class org.hamcrest.xml.HasXPath
+
+
Creates a matcher of Nodes that matches when the examined node contains a node + at the specified xPath, with any content.
+
+
hasXPath(String, NamespaceContext) - Static method in class org.hamcrest.xml.HasXPath
+
+
Creates a matcher of Nodes that matches when the examined node contains a node + at the specified xPath within the specified namespace context, with any content.
+
+
+ + + +

I

+
+
in(Collection<T>) - Static method in class org.hamcrest.collection.IsIn
+
+
Creates a matcher that matches when the examined object is found within the + specified collection.
+
+
in(T[]) - Static method in class org.hamcrest.collection.IsIn
+
+
Creates a matcher that matches when the examined object is found within the + specified array.
+
+
in(Collection<T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches when the examined object is found within the + specified collection.
+
+
in(T[]) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches when the examined object is found within the + specified array.
+
+
instanceOf(Class<?>) - Static method in class org.hamcrest.core.IsInstanceOf
+
+
Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object.
+
+
instanceOf(Class<?>) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object.
+
+
instanceOf(Class<?>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object.
+
+
Is<T> - Class in org.hamcrest.core
+
+
Decorates another Matcher, retaining the behaviour but allowing tests + to be slightly more expressive.
+
+
Is(Matcher<T>) - Constructor for class org.hamcrest.core.Is
+
 
+
is(Matcher<T>) - Static method in class org.hamcrest.core.Is
+
+
Decorates another Matcher, retaining its behaviour, but allowing tests + to be slightly more expressive.
+
+
is(T) - Static method in class org.hamcrest.core.Is
+
+
A shortcut to the frequently used is(equalTo(x)).
+
+
is(Matcher<T>) - Static method in class org.hamcrest.CoreMatchers
+
+
Decorates another Matcher, retaining its behaviour, but allowing tests + to be slightly more expressive.
+
+
is(T) - Static method in class org.hamcrest.CoreMatchers
+
+
A shortcut to the frequently used is(equalTo(x)).
+
+
is(Matcher<T>) - Static method in class org.hamcrest.Matchers
+
+
Decorates another Matcher, retaining its behaviour, but allowing tests + to be slightly more expressive.
+
+
is(T) - Static method in class org.hamcrest.Matchers
+
+
A shortcut to the frequently used is(equalTo(x)).
+
+
IS_DIRECTORY - Static variable in class org.hamcrest.io.FileMatchers
+
 
+
IS_FILE - Static variable in class org.hamcrest.io.FileMatchers
+
 
+
isA(Class<?>) - Static method in class org.hamcrest.core.Is
+
+
A shortcut to the frequently used is(instanceOf(SomeClass.class)).
+
+
isA(Class<T>) - Static method in class org.hamcrest.CoreMatchers
+
+
A shortcut to the frequently used is(instanceOf(SomeClass.class)).
+
+
isA(Class<?>) - Static method in class org.hamcrest.Matchers
+
+
A shortcut to the frequently used is(instanceOf(SomeClass.class)).
+
+
IsAnything<T> - Class in org.hamcrest.core
+
+
A matcher that always returns true.
+
+
IsAnything() - Constructor for class org.hamcrest.core.IsAnything
+
 
+
IsAnything(String) - Constructor for class org.hamcrest.core.IsAnything
+
 
+
IsArray<T> - Class in org.hamcrest.collection
+
+
Matcher for array whose elements satisfy a sequence of matchers.
+
+
IsArray(Matcher<? super T>[]) - Constructor for class org.hamcrest.collection.IsArray
+
 
+
IsArrayContainingInAnyOrder<E> - Class in org.hamcrest.collection
+
+
Deprecated. +
As of release 2.1, replaced by ArrayMatching.
+
+
+
IsArrayContainingInAnyOrder(Collection<Matcher<? super E>>) - Constructor for class org.hamcrest.collection.IsArrayContainingInAnyOrder
+
+
Deprecated.
+
IsArrayContainingInOrder<E> - Class in org.hamcrest.collection
+
+
Deprecated. +
As of release 2.1, replaced by ArrayMatching.
+
+
+
IsArrayContainingInOrder(List<Matcher<? super E>>) - Constructor for class org.hamcrest.collection.IsArrayContainingInOrder
+
+
Deprecated.
+
IsArrayWithSize<E> - Class in org.hamcrest.collection
+
+
Matches if array size satisfies a nested matcher.
+
+
IsArrayWithSize(Matcher<? super Integer>) - Constructor for class org.hamcrest.collection.IsArrayWithSize
+
 
+
IsBlankString - Class in org.hamcrest.text
+
+
Matches blank Strings (and null).
+
+
IsCloseTo - Class in org.hamcrest.number
+
+
Is the value a number equal to a value within some range of + acceptable error?
+
+
IsCloseTo(double, double) - Constructor for class org.hamcrest.number.IsCloseTo
+
 
+
IsCollectionContaining<T> - Class in org.hamcrest.core
+
+
Deprecated. +
As of release 2.1, replaced by IsIterableContaining.
+
+
+
IsCollectionContaining(Matcher<? super T>) - Constructor for class org.hamcrest.core.IsCollectionContaining
+
+
Deprecated.
+
IsCollectionWithSize<E> - Class in org.hamcrest.collection
+
+
Matches if collection size satisfies a nested matcher.
+
+
IsCollectionWithSize(Matcher<? super Integer>) - Constructor for class org.hamcrest.collection.IsCollectionWithSize
+
 
+
IsCompatibleType<T> - Class in org.hamcrest.object
+
 
+
IsCompatibleType(Class<T>) - Constructor for class org.hamcrest.object.IsCompatibleType
+
 
+
IsEmptyCollection<E> - Class in org.hamcrest.collection
+
+
Tests if collection is empty.
+
+
IsEmptyCollection() - Constructor for class org.hamcrest.collection.IsEmptyCollection
+
 
+
IsEmptyIterable<E> - Class in org.hamcrest.collection
+
+
Tests if collection is empty.
+
+
IsEmptyIterable() - Constructor for class org.hamcrest.collection.IsEmptyIterable
+
 
+
isEmptyOrNullString() - Static method in class org.hamcrest.Matchers
+
+
Deprecated. +
use is(emptyOrNullString()) instead
+
+
+
isEmptyOrNullString() - Static method in class org.hamcrest.text.IsEmptyString
+
+
Deprecated. +
use is(emptyOrNullString()) instead
+
+
+
isEmptyString() - Static method in class org.hamcrest.Matchers
+
+
Deprecated. +
use is(emptyString()) instead
+
+
+
IsEmptyString - Class in org.hamcrest.text
+
+
Matches empty Strings (and null).
+
+
isEmptyString() - Static method in class org.hamcrest.text.IsEmptyString
+
+
Deprecated. +
use is(emptyString()) instead
+
+
+
IsEqual<T> - Class in org.hamcrest.core
+
+
Is the value equal to another value, as tested by the + Object.equals(java.lang.Object) invokedMethod?
+
+
IsEqual(T) - Constructor for class org.hamcrest.core.IsEqual
+
 
+
IsEqualCompressingWhiteSpace - Class in org.hamcrest.text
+
+
Tests if a string is equal to another string, compressing any changes in whitespace.
+
+
IsEqualCompressingWhiteSpace(String) - Constructor for class org.hamcrest.text.IsEqualCompressingWhiteSpace
+
 
+
IsEqualIgnoringCase - Class in org.hamcrest.text
+
+
Tests if a string is equal to another string, regardless of the case.
+
+
IsEqualIgnoringCase(String) - Constructor for class org.hamcrest.text.IsEqualIgnoringCase
+
 
+
IsEventFrom - Class in org.hamcrest.object
+
+
Tests if the value is an event announced by a specific object.
+
+
IsEventFrom(Class<?>, Object) - Constructor for class org.hamcrest.object.IsEventFrom
+
 
+
IsIn<T> - Class in org.hamcrest.collection
+
 
+
IsIn(Collection<T>) - Constructor for class org.hamcrest.collection.IsIn
+
 
+
IsIn(T[]) - Constructor for class org.hamcrest.collection.IsIn
+
 
+
isIn(Collection<T>) - Static method in class org.hamcrest.collection.IsIn
+
+
Deprecated. +
use is(in(...)) instead
+
+
+
isIn(T[]) - Static method in class org.hamcrest.collection.IsIn
+
+
Deprecated. +
use is(in(...)) instead
+
+
+
isIn(Collection<T>) - Static method in class org.hamcrest.Matchers
+
+
Deprecated. +
use is(in(...)) instead
+
+
+
isIn(T[]) - Static method in class org.hamcrest.Matchers
+
+
Deprecated. +
use is(in(...)) instead
+
+
+
IsInstanceOf - Class in org.hamcrest.core
+
+
Tests whether the value is an instance of a class.
+
+
IsInstanceOf(Class<?>) - Constructor for class org.hamcrest.core.IsInstanceOf
+
+
Creates a new instance of IsInstanceOf
+
+
IsIterableContaining<T> - Class in org.hamcrest.core
+
 
+
IsIterableContaining(Matcher<? super T>) - Constructor for class org.hamcrest.core.IsIterableContaining
+
 
+
IsIterableContainingInAnyOrder<T> - Class in org.hamcrest.collection
+
 
+
IsIterableContainingInAnyOrder(Collection<Matcher<? super T>>) - Constructor for class org.hamcrest.collection.IsIterableContainingInAnyOrder
+
 
+
IsIterableContainingInOrder<E> - Class in org.hamcrest.collection
+
 
+
IsIterableContainingInOrder(List<Matcher<? super E>>) - Constructor for class org.hamcrest.collection.IsIterableContainingInOrder
+
 
+
IsIterableContainingInRelativeOrder<E> - Class in org.hamcrest.collection
+
 
+
IsIterableContainingInRelativeOrder(List<Matcher<? super E>>) - Constructor for class org.hamcrest.collection.IsIterableContainingInRelativeOrder
+
 
+
IsIterableWithSize<E> - Class in org.hamcrest.collection
+
 
+
IsIterableWithSize(Matcher<? super Integer>) - Constructor for class org.hamcrest.collection.IsIterableWithSize
+
 
+
IsMapContaining<K,V> - Class in org.hamcrest.collection
+
 
+
IsMapContaining(Matcher<? super K>, Matcher<? super V>) - Constructor for class org.hamcrest.collection.IsMapContaining
+
 
+
IsMapWithSize<K,V> - Class in org.hamcrest.collection
+
+
Matches if map size satisfies a nested matcher.
+
+
IsMapWithSize(Matcher<? super Integer>) - Constructor for class org.hamcrest.collection.IsMapWithSize
+
 
+
IsNaN - Class in org.hamcrest.number
+
+
Is the value a number actually not a number (NaN)?
+
+
IsNot<T> - Class in org.hamcrest.core
+
+
Calculates the logical negation of a matcher.
+
+
IsNot(Matcher<T>) - Constructor for class org.hamcrest.core.IsNot
+
 
+
isNotNull(Object, Description) - Static method in class org.hamcrest.BaseMatcher
+
+
Useful null-check method.
+
+
IsNull<T> - Class in org.hamcrest.core
+
+
Is the value null?
+
+
IsNull() - Constructor for class org.hamcrest.core.IsNull
+
 
+
isOneOf(T...) - Static method in class org.hamcrest.collection.IsIn
+
+
Deprecated. +
use is(oneOf(...)) instead
+
+
+
isOneOf(T...) - Static method in class org.hamcrest.Matchers
+
+
Deprecated. +
use is(oneOf(...)) instead
+
+
+
IsSame<T> - Class in org.hamcrest.core
+
+
Is the value the same object as another value?
+
+
IsSame(T) - Constructor for class org.hamcrest.core.IsSame
+
 
+
iterableMatcher - Variable in class org.hamcrest.collection.ArrayAsIterableMatcher
+
 
+
iterableWithSize(Matcher<? super Integer>) - Static method in class org.hamcrest.collection.IsIterableWithSize
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields an item count that satisfies the specified + matcher.
+
+
iterableWithSize(int) - Static method in class org.hamcrest.collection.IsIterableWithSize
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields an item count that is equal to the specified + size argument.
+
+
iterableWithSize(Matcher<? super Integer>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields an item count that satisfies the specified + matcher.
+
+
iterableWithSize(int) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields an item count that is equal to the specified + size argument.
+
+
+ + + +

L

+
+
lessThan(T) - Method in class org.hamcrest.comparator.ComparatorMatcherBuilder
+
+
Creates a matcher of T object that matches when the examined object is + less than the specified value, as reported by the Comparator used to + create this builder.
+
+
lessThan(T) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of Comparable object that matches when the examined object is + less than the specified value, as reported by the compareTo method of the + examined object.
+
+
lessThan(T) - Static method in class org.hamcrest.number.OrderingComparison
+
+
Creates a matcher of Comparable object that matches when the examined object is + less than the specified value, as reported by the compareTo method of the + examined object.
+
+
lessThanOrEqualTo(T) - Method in class org.hamcrest.comparator.ComparatorMatcherBuilder
+
+
Creates a matcher of T object that matches when the examined object is + less than or equal to the specified value, as reported by the Comparator used to + create this builder.
+
+
lessThanOrEqualTo(T) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of Comparable object that matches when the examined object is + less than or equal to the specified value, as reported by the compareTo method + of the examined object.
+
+
lessThanOrEqualTo(T) - Static method in class org.hamcrest.number.OrderingComparison
+
+
Creates a matcher of Comparable object that matches when the examined object is + less than or equal to the specified value, as reported by the compareTo method + of the examined object.
+
+
+ + + +

M

+
+
matched(T, Description) - Static method in class org.hamcrest.Condition
+
 
+
Matcher<T> - Interface in org.hamcrest
+
+
+ A matcher over acceptable values.
+
+
MatcherAssert - Class in org.hamcrest
+
 
+
MatcherAssert() - Constructor for class org.hamcrest.MatcherAssert
+
 
+
matchers - Variable in class org.hamcrest.collection.ArrayAsIterableMatcher
+
 
+
Matchers - Class in org.hamcrest
+
 
+
Matchers() - Constructor for class org.hamcrest.Matchers
+
 
+
matches(Object, Description) - Method in class org.hamcrest.beans.SamePropertyValuesAs
+
 
+
matches(Object) - Method in class org.hamcrest.collection.IsIn
+
 
+
matches(Object, Description) - Method in class org.hamcrest.core.AllOf
+
 
+
matches(Object) - Method in class org.hamcrest.core.AnyOf
+
 
+
matches(Object) - Method in class org.hamcrest.core.DescribedAs
+
 
+
matches(Object) - Method in class org.hamcrest.core.Is
+
 
+
matches(Object) - Method in class org.hamcrest.core.IsAnything
+
 
+
matches(Object) - Method in class org.hamcrest.core.IsEqual
+
 
+
matches(Object, Description) - Method in class org.hamcrest.core.IsInstanceOf
+
 
+
matches(Object) - Method in class org.hamcrest.core.IsNot
+
 
+
matches(Object) - Method in class org.hamcrest.core.IsNull
+
 
+
matches(Object) - Method in class org.hamcrest.core.IsSame
+
 
+
matches(Object) - Method in class org.hamcrest.DiagnosingMatcher
+
 
+
matches(Object, Description) - Method in class org.hamcrest.DiagnosingMatcher
+
 
+
matches(Object) - Method in interface org.hamcrest.Matcher
+
+
Evaluates the matcher for argument item.
+
+
matches(Object) - Method in class org.hamcrest.TypeSafeDiagnosingMatcher
+
 
+
matches(Object) - Method in class org.hamcrest.TypeSafeMatcher
+
+
Methods made final to prevent accidental override.
+
+
matchesPattern(Pattern) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of String that matches when the examined string + exactly matches the given Pattern.
+
+
matchesPattern(String) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of String that matches when the examined string + exactly matches the given regular expression, treated as a Pattern.
+
+
MatchesPattern - Class in org.hamcrest.text
+
 
+
MatchesPattern(Pattern) - Constructor for class org.hamcrest.text.MatchesPattern
+
 
+
matchesPattern(Pattern) - Static method in class org.hamcrest.text.MatchesPattern
+
+
Creates a matcher of String that matches when the examined string + exactly matches the given Pattern.
+
+
matchesPattern(String) - Static method in class org.hamcrest.text.MatchesPattern
+
+
Creates a matcher of String that matches when the examined string + exactly matches the given regular expression, treated as a Pattern.
+
+
matchesRegex(Pattern) - Static method in class org.hamcrest.core.StringRegularExpression
+
+
Creates a matcher that checks if the examined string matches a specified Pattern.
+
+
matchesRegex(String) - Static method in class org.hamcrest.core.StringRegularExpression
+
+
Creates a matcher that checks if the examined string matches a specified regex.
+
+
matchesRegex(Pattern) - Static method in class org.hamcrest.Matchers
+
+
Validate a string with a Pattern.
+
+
matchesRegex(String) - Static method in class org.hamcrest.Matchers
+
+
Validate a string with a regex.
+
+
matchesSafely(T) - Method in class org.hamcrest.beans.HasProperty
+
 
+
matchesSafely(T, Description) - Method in class org.hamcrest.beans.HasPropertyWithValue
+
 
+
matchesSafely(E[]) - Method in class org.hamcrest.collection.ArrayAsIterableMatcher
+
 
+
matchesSafely(T[]) - Method in class org.hamcrest.collection.HasItemInArray
+
 
+
matchesSafely(T[]) - Method in class org.hamcrest.collection.IsArray
+
 
+
matchesSafely(E[]) - Method in class org.hamcrest.collection.IsArrayContainingInAnyOrder
+
+
Deprecated.
+
matchesSafely(E[]) - Method in class org.hamcrest.collection.IsArrayContainingInOrder
+
+
Deprecated.
+
matchesSafely(Collection<? extends E>) - Method in class org.hamcrest.collection.IsEmptyCollection
+
 
+
matchesSafely(Iterable<? extends E>) - Method in class org.hamcrest.collection.IsEmptyIterable
+
 
+
matchesSafely(Iterable<? extends T>, Description) - Method in class org.hamcrest.collection.IsIterableContainingInAnyOrder
+
 
+
matchesSafely(Iterable<? extends E>, Description) - Method in class org.hamcrest.collection.IsIterableContainingInOrder
+
 
+
matchesSafely(Iterable<? extends E>, Description) - Method in class org.hamcrest.collection.IsIterableContainingInRelativeOrder
+
 
+
matchesSafely(Map<? extends K, ? extends V>) - Method in class org.hamcrest.collection.IsMapContaining
+
 
+
matchesSafely(T, Description) - Method in class org.hamcrest.core.CombinableMatcher
+
 
+
matchesSafely(Iterable<? extends T>, Description) - Method in class org.hamcrest.core.Every
+
 
+
matchesSafely(Iterable<? super T>, Description) - Method in class org.hamcrest.core.IsCollectionContaining
+
+
Deprecated.
+
matchesSafely(Iterable<? super T>, Description) - Method in class org.hamcrest.core.IsIterableContaining
+
 
+
matchesSafely(String, Description) - Method in class org.hamcrest.core.StringRegularExpression
+
 
+
matchesSafely(String) - Method in class org.hamcrest.core.SubstringMatcher
+
 
+
matchesSafely(T, Description) - Method in class org.hamcrest.FeatureMatcher
+
 
+
matchesSafely(BigDecimal) - Method in class org.hamcrest.number.BigDecimalCloseTo
+
 
+
matchesSafely(Double) - Method in class org.hamcrest.number.IsCloseTo
+
 
+
matchesSafely(Double) - Method in class org.hamcrest.number.IsNaN
+
 
+
matchesSafely(T, Description) - Method in class org.hamcrest.object.HasEqualValues
+
 
+
matchesSafely(Class<?>) - Method in class org.hamcrest.object.IsCompatibleType
+
 
+
matchesSafely(EventObject, Description) - Method in class org.hamcrest.object.IsEventFrom
+
 
+
matchesSafely(String) - Method in class org.hamcrest.text.IsBlankString
+
 
+
matchesSafely(String) - Method in class org.hamcrest.text.IsEmptyString
+
 
+
matchesSafely(String) - Method in class org.hamcrest.text.IsEqualCompressingWhiteSpace
+
 
+
matchesSafely(String) - Method in class org.hamcrest.text.IsEqualIgnoringCase
+
 
+
matchesSafely(String) - Method in class org.hamcrest.text.MatchesPattern
+
 
+
matchesSafely(String) - Method in class org.hamcrest.text.StringContainsInOrder
+
 
+
matchesSafely(T, Description) - Method in class org.hamcrest.TypeSafeDiagnosingMatcher
+
+
Subclasses should implement this.
+
+
matchesSafely(T) - Method in class org.hamcrest.TypeSafeMatcher
+
+
Subclasses should implement this.
+
+
matchesSafely(Node, Description) - Method in class org.hamcrest.xml.HasXPath
+
 
+
matching(Matcher<T>, String) - Method in class org.hamcrest.Condition
+
 
+
matching(Matcher<T>) - Method in class org.hamcrest.Condition
+
 
+
+ + + +

N

+
+
next() - Method in class org.hamcrest.internal.ArrayIterator
+
 
+
next() - Method in class org.hamcrest.internal.SelfDescribingValueIterator
+
 
+
NO_ARGUMENTS - Static variable in class org.hamcrest.beans.PropertyUtil
+
 
+
NO_NAMESPACE_CONTEXT - Static variable in class org.hamcrest.xml.HasXPath
+
 
+
NONE - Static variable in interface org.hamcrest.Description
+
+
A description that consumes input but does nothing.
+
+
not(Matcher<T>) - Static method in class org.hamcrest.core.IsNot
+
+
Creates a matcher that wraps an existing matcher, but inverts the logic by which + it will match.
+
+
not(T) - Static method in class org.hamcrest.core.IsNot
+
+
A shortcut to the frequently used not(equalTo(x)).
+
+
not(Matcher<T>) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that wraps an existing matcher, but inverts the logic by which + it will match.
+
+
not(T) - Static method in class org.hamcrest.CoreMatchers
+
+
A shortcut to the frequently used not(equalTo(x)).
+
+
not(Matcher<T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that wraps an existing matcher, but inverts the logic by which + it will match.
+
+
not(T) - Static method in class org.hamcrest.Matchers
+
+
A shortcut to the frequently used not(equalTo(x)).
+
+
NOT_MATCHED - Static variable in class org.hamcrest.Condition
+
 
+
notANumber() - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of Doubles that matches when an examined double is not a number.
+
+
notANumber() - Static method in class org.hamcrest.number.IsNaN
+
+
Creates a matcher of Doubles that matches when an examined double is not a number.
+
+
notMatched() - Static method in class org.hamcrest.Condition
+
 
+
notNullValue() - Static method in class org.hamcrest.core.IsNull
+
+
A shortcut to the frequently used not(nullValue()).
+
+
notNullValue(Class<T>) - Static method in class org.hamcrest.core.IsNull
+
+
A shortcut to the frequently used not(nullValue(X.class)).
+
+
notNullValue() - Static method in class org.hamcrest.CoreMatchers
+
+
A shortcut to the frequently used not(nullValue()).
+
+
notNullValue(Class<T>) - Static method in class org.hamcrest.CoreMatchers
+
+
A shortcut to the frequently used not(nullValue(X.class)).
+
+
notNullValue() - Static method in class org.hamcrest.Matchers
+
+
A shortcut to the frequently used not(nullValue()).
+
+
notNullValue(Class<T>) - Static method in class org.hamcrest.Matchers
+
+
A shortcut to the frequently used not(nullValue(X.class)).
+
+
NullDescription() - Constructor for class org.hamcrest.Description.NullDescription
+
 
+
nullSafe(Matcher<? super E>[]) - Static method in class org.hamcrest.internal.NullSafety
+
 
+
NullSafety - Class in org.hamcrest.internal
+
 
+
NullSafety() - Constructor for class org.hamcrest.internal.NullSafety
+
 
+
nullValue() - Static method in class org.hamcrest.core.IsNull
+
+
Creates a matcher that matches if examined object is null.
+
+
nullValue(Class<T>) - Static method in class org.hamcrest.core.IsNull
+
+
Creates a matcher that matches if examined object is null.
+
+
nullValue() - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches if examined object is null.
+
+
nullValue(Class<T>) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches if examined object is null.
+
+
nullValue() - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if examined object is null.
+
+
nullValue(Class<T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches if examined object is null.
+
+
+ + + +

O

+
+
oneOf(T...) - Static method in class org.hamcrest.collection.IsIn
+
+
Creates a matcher that matches when the examined object is equal to one of the + specified elements.
+
+
oneOf(T...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches when the examined object is equal to one of the + specified elements.
+
+
or(Matcher<? super X>) - Method in class org.hamcrest.core.CombinableMatcher.CombinableEitherMatcher
+
 
+
or(Matcher<? super T>) - Method in class org.hamcrest.core.CombinableMatcher
+
 
+
OrderingComparison - Class in org.hamcrest.number
+
 
+
org.hamcrest - package org.hamcrest
+
 
+
org.hamcrest.beans - package org.hamcrest.beans
+
+
Matchers of Java Bean properties and their values.
+
+
org.hamcrest.collection - package org.hamcrest.collection
+
+
Matchers of arrays and collections.
+
+
org.hamcrest.comparator - package org.hamcrest.comparator
+
 
+
org.hamcrest.core - package org.hamcrest.core
+
+
Fundamental matchers of objects and values, and composite matchers.
+
+
org.hamcrest.internal - package org.hamcrest.internal
+
 
+
org.hamcrest.io - package org.hamcrest.io
+
 
+
org.hamcrest.number - package org.hamcrest.number
+
+
Matchers that perform numeric comparisons.
+
+
org.hamcrest.object - package org.hamcrest.object
+
+
Matchers that inspect objects and classes.
+
+
org.hamcrest.text - package org.hamcrest.text
+
+
Matchers that perform text comparisons.
+
+
org.hamcrest.xml - package org.hamcrest.xml
+
+
Matchers of XML documents.
+
+
+ + + +

P

+
+
propertyDescriptorsFor(Object, Class<Object>) - Static method in class org.hamcrest.beans.PropertyUtil
+
+
Returns all the property descriptors for the class associated with the given object
+
+
PropertyUtil - Class in org.hamcrest.beans
+
+
Utility class for accessing properties on JavaBean objects.
+
+
PropertyUtil() - Constructor for class org.hamcrest.beans.PropertyUtil
+
 
+
+ + + +

R

+
+
ReflectiveTypeFinder - Class in org.hamcrest.internal
+
 
+
ReflectiveTypeFinder(String, int, int) - Constructor for class org.hamcrest.internal.ReflectiveTypeFinder
+
 
+
remove() - Method in class org.hamcrest.internal.ArrayIterator
+
 
+
remove() - Method in class org.hamcrest.internal.SelfDescribingValueIterator
+
 
+
+ + + +

S

+
+
sameInstance(T) - Static method in class org.hamcrest.core.IsSame
+
+
Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
+
+
sameInstance(T) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
+
+
sameInstance(T) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
+
+
SamePropertyValuesAs<T> - Class in org.hamcrest.beans
+
 
+
SamePropertyValuesAs(T, List<String>) - Constructor for class org.hamcrest.beans.SamePropertyValuesAs
+
 
+
samePropertyValuesAs(B, String...) - Static method in class org.hamcrest.beans.SamePropertyValuesAs
+
+
Creates a matcher that matches when the examined object has values for all of + its JavaBean properties that are equal to the corresponding values of the + specified bean.
+
+
samePropertyValuesAs(B, String...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches when the examined object has values for all of + its JavaBean properties that are equal to the corresponding values of the + specified bean.
+
+
SelfDescribing - Interface in org.hamcrest
+
+
The ability of an object to describe itself.
+
+
SelfDescribingValue<T> - Class in org.hamcrest.internal
+
 
+
SelfDescribingValue(T) - Constructor for class org.hamcrest.internal.SelfDescribingValue
+
 
+
SelfDescribingValueIterator<T> - Class in org.hamcrest.internal
+
 
+
SelfDescribingValueIterator(Iterator<T>) - Constructor for class org.hamcrest.internal.SelfDescribingValueIterator
+
 
+
startsWith(String) - Static method in class org.hamcrest.core.StringStartsWith
+
+
+ Creates a matcher that matches if the examined String starts with the specified + String.
+
+
startsWith(String) - Static method in class org.hamcrest.CoreMatchers
+
+
+ Creates a matcher that matches if the examined String starts with the specified + String.
+
+
startsWith(String) - Static method in class org.hamcrest.Matchers
+
+
+ Creates a matcher that matches if the examined String starts with the specified + String.
+
+
startsWithIgnoringCase(String) - Static method in class org.hamcrest.core.StringStartsWith
+
+
+ Creates a matcher that matches if the examined String starts with the specified + String, ignoring case
+
+
startsWithIgnoringCase(String) - Static method in class org.hamcrest.CoreMatchers
+
+
+ Creates a matcher that matches if the examined String starts with the specified + String, ignoring case
+
+
startsWithIgnoringCase(String) - Static method in class org.hamcrest.Matchers
+
+
+ Creates a matcher that matches if the examined String starts with the specified + String, ignoring case
+
+
StringContains - Class in org.hamcrest.core
+
+
Tests if the argument is a string that contains a specific substring.
+
+
StringContains(boolean, String) - Constructor for class org.hamcrest.core.StringContains
+
 
+
stringContainsInOrder(Iterable<String>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of String that matches when the examined string contains all of + the specified substrings, considering the order of their appearance.
+
+
stringContainsInOrder(String...) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of String that matches when the examined string contains all of + the specified substrings, considering the order of their appearance.
+
+
StringContainsInOrder - Class in org.hamcrest.text
+
 
+
StringContainsInOrder(Iterable<String>) - Constructor for class org.hamcrest.text.StringContainsInOrder
+
 
+
stringContainsInOrder(Iterable<String>) - Static method in class org.hamcrest.text.StringContainsInOrder
+
+
Creates a matcher of String that matches when the examined string contains all of + the specified substrings, considering the order of their appearance.
+
+
stringContainsInOrder(String...) - Static method in class org.hamcrest.text.StringContainsInOrder
+
+
Creates a matcher of String that matches when the examined string contains all of + the specified substrings, considering the order of their appearance.
+
+
StringDescription - Class in org.hamcrest
+
+
A Description that is stored as a string.
+
+
StringDescription() - Constructor for class org.hamcrest.StringDescription
+
 
+
StringDescription(Appendable) - Constructor for class org.hamcrest.StringDescription
+
 
+
StringEndsWith - Class in org.hamcrest.core
+
+
Tests if the argument is a string that ends with a specific substring.
+
+
StringEndsWith(boolean, String) - Constructor for class org.hamcrest.core.StringEndsWith
+
 
+
StringRegularExpression - Class in org.hamcrest.core
+
 
+
StringRegularExpression(Pattern) - Constructor for class org.hamcrest.core.StringRegularExpression
+
 
+
StringStartsWith - Class in org.hamcrest.core
+
+
Tests if the argument is a string that starts with a specific substring.
+
+
StringStartsWith(boolean, String) - Constructor for class org.hamcrest.core.StringStartsWith
+
 
+
stripSpaces(String) - Method in class org.hamcrest.text.IsEqualCompressingWhiteSpace
+
 
+
substring - Variable in class org.hamcrest.core.SubstringMatcher
+
 
+
SubstringMatcher - Class in org.hamcrest.core
+
 
+
SubstringMatcher(String, boolean, String) - Constructor for class org.hamcrest.core.SubstringMatcher
+
 
+
+ + + +

T

+
+
theInstance(T) - Static method in class org.hamcrest.core.IsSame
+
+
Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
+
+
theInstance(T) - Static method in class org.hamcrest.CoreMatchers
+
+
Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
+
+
theInstance(T) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
+
+
then(Condition.Step<? super T, U>) - Method in class org.hamcrest.Condition
+
 
+
toString() - Method in class org.hamcrest.BaseMatcher
+
 
+
toString() - Method in class org.hamcrest.Description.NullDescription
+
 
+
toString(SelfDescribing) - Static method in class org.hamcrest.StringDescription
+
+
Return the description of a SelfDescribing object as a String.
+
+
toString() - Method in class org.hamcrest.StringDescription
+
+
Returns the description as a string.
+
+
typeCompatibleWith(Class<T>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of Class that matches when the specified baseType is + assignable from the examined class.
+
+
typeCompatibleWith(Class<T>) - Static method in class org.hamcrest.object.IsCompatibleType
+
+
Creates a matcher of Class that matches when the specified baseType is + assignable from the examined class.
+
+
TypeSafeDiagnosingMatcher<T> - Class in org.hamcrest
+
+
Convenient base class for Matchers that require a non-null value of a specific type + and that will report why the received value has been rejected.
+
+
TypeSafeDiagnosingMatcher(Class<?>) - Constructor for class org.hamcrest.TypeSafeDiagnosingMatcher
+
+
Use this constructor if the subclass that implements matchesSafely + is not the class that binds <T> to a type.
+
+
TypeSafeDiagnosingMatcher(ReflectiveTypeFinder) - Constructor for class org.hamcrest.TypeSafeDiagnosingMatcher
+
+
Use this constructor if the subclass that implements matchesSafely + is not the class that binds <T> to a type.
+
+
TypeSafeDiagnosingMatcher() - Constructor for class org.hamcrest.TypeSafeDiagnosingMatcher
+
+
The default constructor for simple sub types
+
+
TypeSafeMatcher<T> - Class in org.hamcrest
+
+
Convenient base class for Matchers that require a non-null value of a specific type.
+
+
TypeSafeMatcher() - Constructor for class org.hamcrest.TypeSafeMatcher
+
+
The default constructor for simple sub types
+
+
TypeSafeMatcher(Class<?>) - Constructor for class org.hamcrest.TypeSafeMatcher
+
+
Use this constructor if the subclass that implements matchesSafely + is not the class that binds <T> to a type.
+
+
TypeSafeMatcher(ReflectiveTypeFinder) - Constructor for class org.hamcrest.TypeSafeMatcher
+
+
Use this constructor if the subclass that implements matchesSafely + is not the class that binds <T> to a type.
+
+
+ + + +

U

+
+
usingNaturalOrdering() - Static method in class org.hamcrest.comparator.ComparatorMatcherBuilder
+
+
Creates a matcher factory for matchers of Comparables.
+
+
+ + + +

_

+
+
_dont_implement_Matcher___instead_extend_BaseMatcher_() - Method in class org.hamcrest.BaseMatcher
+
+
Deprecated.
+
+
_dont_implement_Matcher___instead_extend_BaseMatcher_() - Method in interface org.hamcrest.Matcher
+
+
Deprecated. +
to make
+
+
+
+A B C D E F G H I L M N O P R S T U _ 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/javadoc/2.1/index.html b/docs/javadoc/2.1/index.html new file mode 100644 index 00000000..ca5d01e6 --- /dev/null +++ b/docs/javadoc/2.1/index.html @@ -0,0 +1,75 @@ + + + + + +Hamcrest 2.1 API + + + + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> + + + diff --git a/docs/javadoc/2.1/org/hamcrest/BaseDescription.html b/docs/javadoc/2.1/org/hamcrest/BaseDescription.html new file mode 100644 index 00000000..9ce91dc2 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/BaseDescription.html @@ -0,0 +1,479 @@ + + + + + +BaseDescription (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class BaseDescription

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.BaseDescription
    • +
    +
  • +
+
+ +
+
+
    +
  • + + + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      BaseDescription() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and TypeMethod and Description
      protected abstract voidappend(char c) +
      Append the char c to the description.
      +
      protected voidappend(java.lang.String str) +
      Append the String str to the description.
      +
      DescriptionappendDescriptionOf(SelfDescribing value) +
      Appends the description of a SelfDescribing value to this description.
      +
      DescriptionappendList(java.lang.String start, + java.lang.String separator, + java.lang.String end, + java.lang.Iterable<? extends SelfDescribing> values) +
      Appends a list of SelfDescribing objects + to the description.
      +
      DescriptionappendText(java.lang.String text) +
      Appends some plain text to the description.
      +
      DescriptionappendValue(java.lang.Object value) +
      Appends an arbitrary value to the description.
      +
      <T> DescriptionappendValueList(java.lang.String start, + java.lang.String separator, + java.lang.String end, + java.lang.Iterable<T> values) +
      Appends a list of values to the description.
      +
      <T> DescriptionappendValueList(java.lang.String start, + java.lang.String separator, + java.lang.String end, + T... values) +
      Appends a list of values to the description.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BaseDescription

        +
        public BaseDescription()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        appendText

        +
        public Description appendText(java.lang.String text)
        +
        Description copied from interface: Description
        +
        Appends some plain text to the description.
        +
        +
        Specified by:
        +
        appendText in interface Description
        +
        +
      • +
      + + + + + + + +
        +
      • +

        appendValue

        +
        public Description appendValue(java.lang.Object value)
        +
        Description copied from interface: Description
        +
        Appends an arbitrary value to the description.
        +
        +
        Specified by:
        +
        appendValue in interface Description
        +
        +
      • +
      + + + + + +
        +
      • +

        appendValueList

        +
        @SafeVarargs
        +public final <T> Description appendValueList(java.lang.String start,
        +                                                          java.lang.String separator,
        +                                                          java.lang.String end,
        +                                                          T... values)
        +
        Description copied from interface: Description
        +
        Appends a list of values to the description.
        +
        +
        Specified by:
        +
        appendValueList in interface Description
        +
        +
      • +
      + + + +
        +
      • +

        appendValueList

        +
        public <T> Description appendValueList(java.lang.String start,
        +                                       java.lang.String separator,
        +                                       java.lang.String end,
        +                                       java.lang.Iterable<T> values)
        +
        Description copied from interface: Description
        +
        Appends a list of values to the description.
        +
        +
        Specified by:
        +
        appendValueList in interface Description
        +
        +
      • +
      + + + +
        +
      • +

        appendList

        +
        public Description appendList(java.lang.String start,
        +                              java.lang.String separator,
        +                              java.lang.String end,
        +                              java.lang.Iterable<? extends SelfDescribing> values)
        +
        Description copied from interface: Description
        +
        Appends a list of SelfDescribing objects + to the description.
        +
        +
        Specified by:
        +
        appendList in interface Description
        +
        +
      • +
      + + + +
        +
      • +

        append

        +
        protected void append(java.lang.String str)
        +
        Append the String str to the description. + The default implementation passes every character to append(char). + Override in subclasses to provide an efficient implementation.
        +
      • +
      + + + +
        +
      • +

        append

        +
        protected abstract void append(char c)
        +
        Append the char c to the description.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/BaseMatcher.html b/docs/javadoc/2.1/org/hamcrest/BaseMatcher.html new file mode 100644 index 00000000..21313a57 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/BaseMatcher.html @@ -0,0 +1,383 @@ + + + + + +BaseMatcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class BaseMatcher<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.BaseMatcher<T>
    • +
    +
  • +
+
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BaseMatcher

        +
        public BaseMatcher()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        describeMismatch

        +
        public void describeMismatch(java.lang.Object item,
        +                             Description description)
        +
        Description copied from interface: Matcher
        +
        Generate a description of why the matcher has not accepted the item. + The description will be part of a larger description of why a matching + failed, so it should be concise. + This method assumes that matches(item) is false, but + will not check this.
        +
        +
        Specified by:
        +
        describeMismatch in interface Matcher<T>
        +
        Parameters:
        +
        item - The item that the Matcher has rejected.
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        isNotNull

        +
        protected static boolean isNotNull(java.lang.Object actual,
        +                                   Description mismatch)
        +
        Useful null-check method. Writes a mismatch description if the actual object is null
        +
        +
        Parameters:
        +
        actual - the object to check
        +
        mismatch - where to write the mismatch description, if any
        +
        Returns:
        +
        false iff the actual object is null
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/Condition.Step.html b/docs/javadoc/2.1/org/hamcrest/Condition.Step.html new file mode 100644 index 00000000..17f80523 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/Condition.Step.html @@ -0,0 +1,227 @@ + + + + + +Condition.Step (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Interface Condition.Step<I,O>

+
+
+
+
    +
  • +
    +
    Enclosing class:
    +
    Condition<T>
    +
    +
    +
    +
    public static interface Condition.Step<I,O>
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/Condition.html b/docs/javadoc/2.1/org/hamcrest/Condition.html new file mode 100644 index 00000000..eae1e968 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/Condition.html @@ -0,0 +1,367 @@ + + + + + +Condition (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class Condition<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.Condition<T>
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public abstract class Condition<T>
    +extends java.lang.Object
    +
    A Condition implements part of a multi-step match. We sometimes need to write matchers + that have a sequence of steps, where each step depends on the result of the previous + step and we can stop processing as soon as a step fails. These classes provide + infrastructure for writing such a sequence. + + Based on https://github.com/npryce/maybe-java
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        NOT_MATCHED

        +
        public static final org.hamcrest.Condition.NotMatched<java.lang.Object> NOT_MATCHED
        +
      • +
      +
    • +
    + + +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/CoreMatchers.html b/docs/javadoc/2.1/org/hamcrest/CoreMatchers.html new file mode 100644 index 00000000..a2ad61d6 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/CoreMatchers.html @@ -0,0 +1,1077 @@ + + + + + +CoreMatchers (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class CoreMatchers

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.CoreMatchers
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class CoreMatchers
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      CoreMatchers() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static <T> Matcher<T>allOf(java.lang.Iterable<Matcher<? super T>> matchers) +
      Creates a matcher that matches if the examined object matches ALL of the specified matchers.
      +
      static <T> Matcher<T>allOf(Matcher<? super T>... matchers) +
      Creates a matcher that matches if the examined object matches ALL of the specified matchers.
      +
      static <T> Matcher<T>any(java.lang.Class<T> type) +
      Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object.
      +
      static <T> AnyOf<T>anyOf(java.lang.Iterable<Matcher<? super T>> matchers) +
      Creates a matcher that matches if the examined object matches ANY of the specified matchers.
      +
      static <T> AnyOf<T>anyOf(Matcher<? super T>... matchers) +
      Creates a matcher that matches if the examined object matches ANY of the specified matchers.
      +
      static Matcher<java.lang.Object>anything() +
      Creates a matcher that always matches, regardless of the examined object.
      +
      static Matcher<java.lang.Object>anything(java.lang.String description) +
      Creates a matcher that always matches, regardless of the examined object, but describes + itself with the specified String.
      +
      static <LHS> CombinableMatcher.CombinableBothMatcher<LHS>both(Matcher<? super LHS> matcher) +
      Creates a matcher that matches when both of the specified matchers match the examined object.
      +
      static Matcher<java.lang.String>containsString(java.lang.String substring) +
      Creates a matcher that matches if the examined String contains the specified + String anywhere.
      +
      static Matcher<java.lang.String>containsStringIgnoringCase(java.lang.String substring) +
      Creates a matcher that matches if the examined String contains the specified + String anywhere, ignoring case.
      +
      static <T> Matcher<T>describedAs(java.lang.String description, + Matcher<T> matcher, + java.lang.Object... values) +
      Wraps an existing matcher, overriding its description with that specified.
      +
      static <LHS> CombinableMatcher.CombinableEitherMatcher<LHS>either(Matcher<? super LHS> matcher) +
      Creates a matcher that matches when either of the specified matchers match the examined object.
      +
      static Matcher<java.lang.String>endsWith(java.lang.String suffix) +
      Creates a matcher that matches if the examined String ends with the specified + String.
      +
      static Matcher<java.lang.String>endsWithIgnoringCase(java.lang.String suffix) +
      Creates a matcher that matches if the examined String ends with the specified + String, ignoring case.
      +
      static <T> Matcher<T>equalTo(T operand) +
      Creates a matcher that matches when the examined object is logically equal to the specified + operand, as determined by calling the Object.equals(java.lang.Object) method on + the examined object.
      +
      static Matcher<java.lang.Object>equalToObject(java.lang.Object operand) +
      Creates an IsEqual matcher that does not enforce the values being + compared to be of the same static type.
      +
      static <U> Matcher<java.lang.Iterable<? extends U>>everyItem(Matcher<U> itemMatcher) +
      Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields items that are all matched by the specified + itemMatcher.
      +
      static <T> Matcher<java.lang.Iterable<? super T>>hasItem(Matcher<? super T> itemMatcher) +
      Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is matched by the specified + itemMatcher.
      +
      static <T> Matcher<java.lang.Iterable<? super T>>hasItem(T item) +
      Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is equal to the specified + item.
      +
      static <T> Matcher<java.lang.Iterable<T>>hasItems(Matcher<? super T>... itemMatchers) +
      Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is matched by the corresponding + matcher from the specified itemMatchers.
      +
      static <T> Matcher<java.lang.Iterable<T>>hasItems(T... items) +
      Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is equal to the corresponding + item from the specified items.
      +
      static <T> Matcher<T>instanceOf(java.lang.Class<?> type) +
      Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object.
      +
      static <T> Matcher<T>is(Matcher<T> matcher) +
      Decorates another Matcher, retaining its behaviour, but allowing tests + to be slightly more expressive.
      +
      static <T> Matcher<T>is(T value) +
      A shortcut to the frequently used is(equalTo(x)).
      +
      static <T> Matcher<T>isA(java.lang.Class<T> type) +
      A shortcut to the frequently used is(instanceOf(SomeClass.class)).
      +
      static <T> Matcher<T>not(Matcher<T> matcher) +
      Creates a matcher that wraps an existing matcher, but inverts the logic by which + it will match.
      +
      static <T> Matcher<T>not(T value) +
      A shortcut to the frequently used not(equalTo(x)).
      +
      static Matcher<java.lang.Object>notNullValue() +
      A shortcut to the frequently used not(nullValue()).
      +
      static <T> Matcher<T>notNullValue(java.lang.Class<T> type) +
      A shortcut to the frequently used not(nullValue(X.class)).
      +
      static Matcher<java.lang.Object>nullValue() +
      Creates a matcher that matches if examined object is null.
      +
      static <T> Matcher<T>nullValue(java.lang.Class<T> type) +
      Creates a matcher that matches if examined object is null.
      +
      static <T> Matcher<T>sameInstance(T target) +
      Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
      +
      static Matcher<java.lang.String>startsWith(java.lang.String prefix) +
      + Creates a matcher that matches if the examined String starts with the specified + String.
      +
      static Matcher<java.lang.String>startsWithIgnoringCase(java.lang.String prefix) +
      + Creates a matcher that matches if the examined String starts with the specified + String, ignoring case
      +
      static <T> Matcher<T>theInstance(T target) +
      Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CoreMatchers

        +
        public CoreMatchers()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        allOf

        +
        public static <T> Matcher<T> allOf(java.lang.Iterable<Matcher<? super T>> matchers)
        +
        Creates a matcher that matches if the examined object matches ALL of the specified matchers. + For example: +
        assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        allOf

        +
        @SafeVarargs
        +public static <T> Matcher<T> allOf(Matcher<? super T>... matchers)
        +
        Creates a matcher that matches if the examined object matches ALL of the specified matchers. + For example: +
        assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(java.lang.Iterable<Matcher<? super T>> matchers)
        +
        Creates a matcher that matches if the examined object matches ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        @SafeVarargs
        +public static <T> AnyOf<T> anyOf(Matcher<? super T>... matchers)
        +
        Creates a matcher that matches if the examined object matches ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        both

        +
        public static <LHS> CombinableMatcher.CombinableBothMatcher<LHS> both(Matcher<? super LHS> matcher)
        +
        Creates a matcher that matches when both of the specified matchers match the examined object. + For example: +
        assertThat("fab", both(containsString("a")).and(containsString("b")))
        +
      • +
      + + + +
        +
      • +

        either

        +
        public static <LHS> CombinableMatcher.CombinableEitherMatcher<LHS> either(Matcher<? super LHS> matcher)
        +
        Creates a matcher that matches when either of the specified matchers match the examined object. + For example: +
        assertThat("fan", either(containsString("a")).or(containsString("b")))
        +
      • +
      + + + +
        +
      • +

        describedAs

        +
        public static <T> Matcher<T> describedAs(java.lang.String description,
        +                                         Matcher<T> matcher,
        +                                         java.lang.Object... values)
        +
        Wraps an existing matcher, overriding its description with that specified. All other functions are + delegated to the decorated matcher, including its mismatch description. + For example: +
        describedAs("a big decimal equal to %0", equalTo(myBigDecimal), myBigDecimal.toPlainString())
        +
        +
        Parameters:
        +
        description - the new description for the wrapped matcher
        +
        matcher - the matcher to wrap
        +
        values - optional values to insert into the tokenised description
        +
        +
      • +
      + + + +
        +
      • +

        everyItem

        +
        public static <U> Matcher<java.lang.Iterable<? extends U>> everyItem(Matcher<U> itemMatcher)
        +
        Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields items that are all matched by the specified + itemMatcher. + For example: +
        assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))
        +
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to every item provided by the examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        is

        +
        public static <T> Matcher<T> is(Matcher<T> matcher)
        +
        Decorates another Matcher, retaining its behaviour, but allowing tests + to be slightly more expressive. + For example: +
        assertThat(cheese, is(equalTo(smelly)))
        + instead of: +
        assertThat(cheese, equalTo(smelly))
        +
      • +
      + + + + + +
        +
      • +

        is

        +
        public static <T> Matcher<T> is(T value)
        +
        A shortcut to the frequently used is(equalTo(x)). + For example: +
        assertThat(cheese, is(smelly))
        + instead of: +
        assertThat(cheese, is(equalTo(smelly)))
        +
      • +
      + + + +
        +
      • +

        isA

        +
        public static <T> Matcher<T> isA(java.lang.Class<T> type)
        +
        A shortcut to the frequently used is(instanceOf(SomeClass.class)). + For example: +
        assertThat(cheese, isA(Cheddar.class))
        + instead of: +
        assertThat(cheese, is(instanceOf(Cheddar.class)))
        +
      • +
      + + + +
        +
      • +

        anything

        +
        public static Matcher<java.lang.Object> anything()
        +
        Creates a matcher that always matches, regardless of the examined object.
        +
      • +
      + + + +
        +
      • +

        anything

        +
        public static Matcher<java.lang.Object> anything(java.lang.String description)
        +
        Creates a matcher that always matches, regardless of the examined object, but describes + itself with the specified String.
        +
        +
        Parameters:
        +
        description - a meaningful String used when describing itself
        +
        +
      • +
      + + + +
        +
      • +

        hasItem

        +
        public static <T> Matcher<java.lang.Iterable<? super T>> hasItem(Matcher<? super T> itemMatcher)
        +
        Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is matched by the specified + itemMatcher. Whilst matching, the traversal of the examined Iterable + will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar"), hasItem(startsWith("ba")))
        +
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to items provided by the examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        hasItem

        +
        public static <T> Matcher<java.lang.Iterable<? super T>> hasItem(T item)
        +
        Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is equal to the specified + item. Whilst matching, the traversal of the examined Iterable + will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar"), hasItem("bar"))
        +
        +
        Parameters:
        +
        item - the item to compare against the items provided by the examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        hasItems

        +
        @SafeVarargs
        +public static <T> Matcher<java.lang.Iterable<T>> hasItems(Matcher<? super T>... itemMatchers)
        +
        Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is matched by the corresponding + matcher from the specified itemMatchers. Whilst matching, each traversal of + the examined Iterable will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar", "baz"), hasItems(endsWith("z"), endsWith("o")))
        +
        +
        Parameters:
        +
        itemMatchers - the matchers to apply to items provided by the examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        hasItems

        +
        @SafeVarargs
        +public static <T> Matcher<java.lang.Iterable<T>> hasItems(T... items)
        +
        Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is equal to the corresponding + item from the specified items. Whilst matching, each traversal of the + examined Iterable will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar", "baz"), hasItems("baz", "foo"))
        +
        +
        Parameters:
        +
        items - the items to compare against the items provided by the examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        equalTo

        +
        public static <T> Matcher<T> equalTo(T operand)
        +
        Creates a matcher that matches when the examined object is logically equal to the specified + operand, as determined by calling the Object.equals(java.lang.Object) method on + the examined object. + +

        If the specified operand is null then the created matcher will only match if + the examined object's equals method returns true when passed a + null (which would be a violation of the equals contract), unless the + examined object itself is null, in which case the matcher will return a positive + match.

        + +

        The created matcher provides a special behaviour when examining Arrays, whereby + it will match if both the operand and the examined object are arrays of the same length and + contain items that are equal to each other (according to the above rules) in the same + indexes.

        + For example: +
        + assertThat("foo", equalTo("foo"));
        + assertThat(new String[] {"foo", "bar"}, equalTo(new String[] {"foo", "bar"}));
        + 
        +
      • +
      + + + +
        +
      • +

        equalToObject

        +
        public static Matcher<java.lang.Object> equalToObject(java.lang.Object operand)
        +
        Creates an IsEqual matcher that does not enforce the values being + compared to be of the same static type.
        +
      • +
      + + + +
        +
      • +

        any

        +
        public static <T> Matcher<T> any(java.lang.Class<T> type)
        +
        Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object. + +

        The created matcher forces a relationship between specified type and the examined object, and should be + used when it is necessary to make generics conform, for example in the JMock clause + with(any(Thing.class))

        + For example: +
        assertThat(new Canoe(), instanceOf(Canoe.class));
        +
      • +
      + + + +
        +
      • +

        instanceOf

        +
        public static <T> Matcher<T> instanceOf(java.lang.Class<?> type)
        +
        Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object. + +

        The created matcher assumes no relationship between specified type and the examined object.

        + For example: +
        assertThat(new Canoe(), instanceOf(Paddlable.class));
        +
      • +
      + + + +
        +
      • +

        not

        +
        public static <T> Matcher<T> not(Matcher<T> matcher)
        +
        Creates a matcher that wraps an existing matcher, but inverts the logic by which + it will match. + For example: +
        assertThat(cheese, is(not(equalTo(smelly))))
        +
        +
        Parameters:
        +
        matcher - the matcher whose sense should be inverted
        +
        +
      • +
      + + + + + +
        +
      • +

        not

        +
        public static <T> Matcher<T> not(T value)
        +
        A shortcut to the frequently used not(equalTo(x)). + For example: +
        assertThat(cheese, is(not(smelly)))
        + instead of: +
        assertThat(cheese, is(not(equalTo(smelly))))
        +
        +
        Parameters:
        +
        value - the value that any examined object should not equal
        +
        +
      • +
      + + + +
        +
      • +

        notNullValue

        +
        public static Matcher<java.lang.Object> notNullValue()
        +
        A shortcut to the frequently used not(nullValue()). + For example: +
        assertThat(cheese, is(notNullValue()))
        + instead of: +
        assertThat(cheese, is(not(nullValue())))
        +
      • +
      + + + +
        +
      • +

        notNullValue

        +
        public static <T> Matcher<T> notNullValue(java.lang.Class<T> type)
        +
        A shortcut to the frequently used not(nullValue(X.class)). Accepts a + single dummy argument to facilitate type inference.. + For example: +
        assertThat(cheese, is(notNullValue(X.class)))
        + instead of: +
        assertThat(cheese, is(not(nullValue(X.class))))
        +
        +
        Parameters:
        +
        type - dummy parameter used to infer the generic type of the returned matcher
        +
        +
      • +
      + + + +
        +
      • +

        nullValue

        +
        public static Matcher<java.lang.Object> nullValue()
        +
        Creates a matcher that matches if examined object is null. + For example: +
        assertThat(cheese, is(nullValue())
        +
      • +
      + + + +
        +
      • +

        nullValue

        +
        public static <T> Matcher<T> nullValue(java.lang.Class<T> type)
        +
        Creates a matcher that matches if examined object is null. Accepts a + single dummy argument to facilitate type inference. + For example: +
        assertThat(cheese, is(nullValue(Cheese.class))
        +
        +
        Parameters:
        +
        type - dummy parameter used to infer the generic type of the returned matcher
        +
        +
      • +
      + + + + + +
        +
      • +

        sameInstance

        +
        public static <T> Matcher<T> sameInstance(T target)
        +
        Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
        +
        +
        Parameters:
        +
        target - the target instance against which others should be assessed
        +
        +
      • +
      + + + + + +
        +
      • +

        theInstance

        +
        public static <T> Matcher<T> theInstance(T target)
        +
        Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
        +
        +
        Parameters:
        +
        target - the target instance against which others should be assessed
        +
        +
      • +
      + + + +
        +
      • +

        containsString

        +
        public static Matcher<java.lang.String> containsString(java.lang.String substring)
        +
        Creates a matcher that matches if the examined String contains the specified + String anywhere. + For example: +
        assertThat("myStringOfNote", containsString("ring"))
        +
        +
        Parameters:
        +
        substring - the substring that the returned matcher will expect to find within any examined string
        +
        +
      • +
      + + + +
        +
      • +

        containsStringIgnoringCase

        +
        public static Matcher<java.lang.String> containsStringIgnoringCase(java.lang.String substring)
        +
        Creates a matcher that matches if the examined String contains the specified + String anywhere, ignoring case. + For example: +
        assertThat("myStringOfNote", containsString("ring"))
        +
        +
        Parameters:
        +
        substring - the substring that the returned matcher will expect to find within any examined string
        +
        +
      • +
      + + + +
        +
      • +

        startsWith

        +
        public static Matcher<java.lang.String> startsWith(java.lang.String prefix)
        +

        + Creates a matcher that matches if the examined String starts with the specified + String. +

        + For example: +
        assertThat("myStringOfNote", startsWith("my"))
        +
        +
        Parameters:
        +
        prefix - the substring that the returned matcher will expect at the start of any examined string
        +
        +
      • +
      + + + +
        +
      • +

        startsWithIgnoringCase

        +
        public static Matcher<java.lang.String> startsWithIgnoringCase(java.lang.String prefix)
        +

        + Creates a matcher that matches if the examined String starts with the specified + String, ignoring case +

        + For example: +
        assertThat("myStringOfNote", startsWith("my"))
        +
        +
        Parameters:
        +
        prefix - the substring that the returned matcher will expect at the start of any examined string
        +
        +
      • +
      + + + +
        +
      • +

        endsWith

        +
        public static Matcher<java.lang.String> endsWith(java.lang.String suffix)
        +
        Creates a matcher that matches if the examined String ends with the specified + String. + For example: +
        assertThat("myStringOfNote", endsWith("Note"))
        +
        +
        Parameters:
        +
        suffix - the substring that the returned matcher will expect at the end of any examined string
        +
        +
      • +
      + + + +
        +
      • +

        endsWithIgnoringCase

        +
        public static Matcher<java.lang.String> endsWithIgnoringCase(java.lang.String suffix)
        +
        Creates a matcher that matches if the examined String ends with the specified + String, ignoring case. + For example: +
        assertThat("myStringOfNote", endsWith("Note"))
        +
        +
        Parameters:
        +
        suffix - the substring that the returned matcher will expect at the end of any examined string
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/CustomMatcher.html b/docs/javadoc/2.1/org/hamcrest/CustomMatcher.html new file mode 100644 index 00000000..d08d8c2a --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/CustomMatcher.html @@ -0,0 +1,324 @@ + + + + + +CustomMatcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class CustomMatcher<T>

+
+
+ +
+
    +
  • +
    +
    Type Parameters:
    +
    T - The type of object being matched.
    +
    +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public abstract class CustomMatcher<T>
    +extends BaseMatcher<T>
    +
    Utility class for writing one off matchers. + For example: +
    + Matcher<String> aNonEmptyString = new CustomMatcher<String>("a non empty string") {
    +   public boolean matches(Object object) {
    +     return ((object instanceof String) && !((String) object).isEmpty();
    +   }
    + };
    + 
    +

    + This class is designed for scenarios where an anonymous inner class + matcher makes sense. It should not be used by API designers implementing + matchers.

    +
    +
    See Also:
    +
    for a type safe variant of this class that you probably + want to use.
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CustomMatcher

        +
        public CustomMatcher(java.lang.String description)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        describeTo

        +
        public final void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/CustomTypeSafeMatcher.html b/docs/javadoc/2.1/org/hamcrest/CustomTypeSafeMatcher.html new file mode 100644 index 00000000..93ac03d2 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/CustomTypeSafeMatcher.html @@ -0,0 +1,327 @@ + + + + + +CustomTypeSafeMatcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class CustomTypeSafeMatcher<T>

+
+
+ +
+
    +
  • +
    +
    Type Parameters:
    +
    T - The type of object being matched
    +
    +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public abstract class CustomTypeSafeMatcher<T>
    +extends TypeSafeMatcher<T>
    +
    Utility class for writing one off matchers. + For example: +
    + Matcher<String> aNonEmptyString = new CustomTypeSafeMatcher<String>("a non empty string") {
    +   public boolean matchesSafely(String string) {
    +     return !string.isEmpty();
    +   }
    +   public void describeMismatchSafely(String string, Description mismatchDescription) {
    +     mismatchDescription.appendText("was empty");
    +   }
    + };
    + 
    + This is a variant of CustomMatcher that first type checks + the argument being matched. By the time TypeSafeMatcher.matchesSafely(T) is + is called the argument is guaranteed to be non-null and of the correct + type.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CustomTypeSafeMatcher

        +
        public CustomTypeSafeMatcher(java.lang.String description)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        describeTo

        +
        public final void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/Description.NullDescription.html b/docs/javadoc/2.1/org/hamcrest/Description.NullDescription.html new file mode 100644 index 00000000..3ecb79b7 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/Description.NullDescription.html @@ -0,0 +1,460 @@ + + + + + +Description.NullDescription (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class Description.NullDescription

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.Description.NullDescription
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Description
    +
    +
    +
    Enclosing interface:
    +
    Description
    +
    +
    +
    +
    public static final class Description.NullDescription
    +extends java.lang.Object
    +implements Description
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NullDescription

        +
        public NullDescription()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        appendList

        +
        public Description appendList(java.lang.String start,
        +                              java.lang.String separator,
        +                              java.lang.String end,
        +                              java.lang.Iterable<? extends SelfDescribing> values)
        +
        Description copied from interface: Description
        +
        Appends a list of SelfDescribing objects + to the description.
        +
        +
        Specified by:
        +
        appendList in interface Description
        +
        +
      • +
      + + + +
        +
      • +

        appendText

        +
        public Description appendText(java.lang.String text)
        +
        Description copied from interface: Description
        +
        Appends some plain text to the description.
        +
        +
        Specified by:
        +
        appendText in interface Description
        +
        +
      • +
      + + + +
        +
      • +

        appendValue

        +
        public Description appendValue(java.lang.Object value)
        +
        Description copied from interface: Description
        +
        Appends an arbitrary value to the description.
        +
        +
        Specified by:
        +
        appendValue in interface Description
        +
        +
      • +
      + + + + + +
        +
      • +

        appendValueList

        +
        public <T> Description appendValueList(java.lang.String start,
        +                                       java.lang.String separator,
        +                                       java.lang.String end,
        +                                       T... values)
        +
        Description copied from interface: Description
        +
        Appends a list of values to the description.
        +
        +
        Specified by:
        +
        appendValueList in interface Description
        +
        +
      • +
      + + + +
        +
      • +

        appendValueList

        +
        public <T> Description appendValueList(java.lang.String start,
        +                                       java.lang.String separator,
        +                                       java.lang.String end,
        +                                       java.lang.Iterable<T> values)
        +
        Description copied from interface: Description
        +
        Appends a list of values to the description.
        +
        +
        Specified by:
        +
        appendValueList in interface Description
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/Description.html b/docs/javadoc/2.1/org/hamcrest/Description.html new file mode 100644 index 00000000..91237e7d --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/Description.html @@ -0,0 +1,392 @@ + + + + + +Description (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Interface Description

+
+
+
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        NONE

        +
        static final Description NONE
        +
        A description that consumes input but does nothing.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        appendText

        +
        Description appendText(java.lang.String text)
        +
        Appends some plain text to the description.
        +
      • +
      + + + + + + + +
        +
      • +

        appendValue

        +
        Description appendValue(java.lang.Object value)
        +
        Appends an arbitrary value to the description.
        +
      • +
      + + + + + +
        +
      • +

        appendValueList

        +
        <T> Description appendValueList(java.lang.String start,
        +                                java.lang.String separator,
        +                                java.lang.String end,
        +                                T... values)
        +
        Appends a list of values to the description.
        +
      • +
      + + + +
        +
      • +

        appendValueList

        +
        <T> Description appendValueList(java.lang.String start,
        +                                java.lang.String separator,
        +                                java.lang.String end,
        +                                java.lang.Iterable<T> values)
        +
        Appends a list of values to the description.
        +
      • +
      + + + +
        +
      • +

        appendList

        +
        Description appendList(java.lang.String start,
        +                       java.lang.String separator,
        +                       java.lang.String end,
        +                       java.lang.Iterable<? extends SelfDescribing> values)
        +
        Appends a list of SelfDescribing objects + to the description.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/DiagnosingMatcher.html b/docs/javadoc/2.1/org/hamcrest/DiagnosingMatcher.html new file mode 100644 index 00000000..1986de88 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/DiagnosingMatcher.html @@ -0,0 +1,365 @@ + + + + + +DiagnosingMatcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class DiagnosingMatcher<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DiagnosingMatcher

        +
        public DiagnosingMatcher()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matches

        +
        public final boolean matches(java.lang.Object item)
        +
        Description copied from interface: Matcher
        +
        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:
        +
        item - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatch

        +
        public final void describeMismatch(java.lang.Object item,
        +                                   Description mismatchDescription)
        +
        Description copied from interface: Matcher
        +
        Generate a description of why the matcher has not accepted the item. + The description will be part of a larger description of why a matching + failed, so it should be concise. + This method assumes that matches(item) is false, but + will not check this.
        +
        +
        Specified by:
        +
        describeMismatch in interface Matcher<T>
        +
        Overrides:
        +
        describeMismatch in class BaseMatcher<T>
        +
        Parameters:
        +
        item - The item that the Matcher has rejected.
        +
        mismatchDescription - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        matches

        +
        protected abstract boolean matches(java.lang.Object item,
        +                                   Description mismatchDescription)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/FeatureMatcher.html b/docs/javadoc/2.1/org/hamcrest/FeatureMatcher.html new file mode 100644 index 00000000..318e0cad --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/FeatureMatcher.html @@ -0,0 +1,381 @@ + + + + + +FeatureMatcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class FeatureMatcher<T,U>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FeatureMatcher

        +
        public FeatureMatcher(Matcher<? super U> subMatcher,
        +                      java.lang.String featureDescription,
        +                      java.lang.String featureName)
        +
        Constructor
        +
        +
        Parameters:
        +
        subMatcher - The matcher to apply to the feature
        +
        featureDescription - Descriptive text to use in describeTo
        +
        featureName - Identifying text for mismatch message
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        featureValueOf

        +
        protected abstract U featureValueOf(T actual)
        +
        Implement this to extract the interesting feature.
        +
        +
        Parameters:
        +
        actual - the target object
        +
        Returns:
        +
        the feature to be matched
        +
        +
      • +
      + + + + + + + + + +
        +
      • +

        describeTo

        +
        public final void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/Matcher.html b/docs/javadoc/2.1/org/hamcrest/Matcher.html new file mode 100644 index 00000000..0eaa13e7 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/Matcher.html @@ -0,0 +1,328 @@ + + + + + +Matcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Interface Matcher<T>

+
+
+
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matches

        +
        boolean matches(java.lang.Object actual)
        +
        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:
        +
        actual - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatch

        +
        void describeMismatch(java.lang.Object actual,
        +                      Description mismatchDescription)
        +
        Generate a description of why the matcher has not accepted the item. + The description will be part of a larger description of why a matching + failed, so it should be concise. + This method assumes that matches(item) is false, but + will not check this.
        +
        +
        Parameters:
        +
        actual - The item that the Matcher has rejected.
        +
        mismatchDescription - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        _dont_implement_Matcher___instead_extend_BaseMatcher_

        +
        @Deprecated
        +void _dont_implement_Matcher___instead_extend_BaseMatcher_()
        +
        Deprecated. to make
        +
        This method simply acts a friendly reminder not to implement Matcher directly and + instead extend BaseMatcher. It's easy to ignore JavaDoc, but a bit harder to ignore + compile errors .
        +
        +
        See Also:
        +
        for reasons why., +BaseMatcher
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/MatcherAssert.html b/docs/javadoc/2.1/org/hamcrest/MatcherAssert.html new file mode 100644 index 00000000..4c753c08 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/MatcherAssert.html @@ -0,0 +1,307 @@ + + + + + +MatcherAssert (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class MatcherAssert

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.MatcherAssert
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class MatcherAssert
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      MatcherAssert() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static voidassertThat(java.lang.String reason, + boolean assertion) 
      static <T> voidassertThat(java.lang.String reason, + T actual, + Matcher<? super T> matcher) 
      static <T> voidassertThat(T actual, + Matcher<? super T> matcher) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MatcherAssert

        +
        public MatcherAssert()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        assertThat

        +
        public static <T> void assertThat(T actual,
        +                                  Matcher<? super T> matcher)
        +
      • +
      + + + + + +
        +
      • +

        assertThat

        +
        public static <T> void assertThat(java.lang.String reason,
        +                                  T actual,
        +                                  Matcher<? super T> matcher)
        +
      • +
      + + + +
        +
      • +

        assertThat

        +
        public static void assertThat(java.lang.String reason,
        +                              boolean assertion)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/Matchers.html b/docs/javadoc/2.1/org/hamcrest/Matchers.html new file mode 100644 index 00000000..3ce516b2 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/Matchers.html @@ -0,0 +1,3426 @@ + + + + + +Matchers (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class Matchers

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.Matchers
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Matchers
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      Matchers() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethod and Description
      static <T> Matcher<T>allOf(java.lang.Iterable<Matcher<? super T>> matchers) +
      Creates a matcher that matches if the examined object matches ALL of the specified matchers.
      +
      static <T> Matcher<T>allOf(Matcher<? super T>... matchers) +
      Creates a matcher that matches if the examined object matches ALL of the specified matchers.
      +
      static <T> Matcher<T>allOf(Matcher<? super T> first, + Matcher<? super T> second) +
      Creates a matcher that matches if the examined object matches ALL of the specified matchers.
      +
      static <T> Matcher<T>allOf(Matcher<? super T> first, + Matcher<? super T> second, + Matcher<? super T> third) +
      Creates a matcher that matches if the examined object matches ALL of the specified matchers.
      +
      static <T> Matcher<T>allOf(Matcher<? super T> first, + Matcher<? super T> second, + Matcher<? super T> third, + Matcher<? super T> fourth) +
      Creates a matcher that matches if the examined object matches ALL of the specified matchers.
      +
      static <T> Matcher<T>allOf(Matcher<? super T> first, + Matcher<? super T> second, + Matcher<? super T> third, + Matcher<? super T> fourth, + Matcher<? super T> fifth) +
      Creates a matcher that matches if the examined object matches ALL of the specified matchers.
      +
      static <T> Matcher<T>allOf(Matcher<? super T> first, + Matcher<? super T> second, + Matcher<? super T> third, + Matcher<? super T> fourth, + Matcher<? super T> fifth, + Matcher<? super T> sixth) +
      Creates a matcher that matches if the examined object matches ALL of the specified matchers.
      +
      static <K,V> Matcher<java.util.Map<? extends K,? extends V>>aMapWithSize(int size) +
      Creates a matcher for Maps that matches when the size() method returns + a value equal to the specified size.
      +
      static <K,V> Matcher<java.util.Map<? extends K,? extends V>>aMapWithSize(Matcher<? super java.lang.Integer> sizeMatcher) +
      Creates a matcher for Maps that matches when the size() method returns + a value that satisfies the specified matcher.
      +
      static <K,V> Matcher<java.util.Map<? extends K,? extends V>>anEmptyMap() +
      Creates a matcher for Maps that matches when the size() method returns + zero.
      +
      static <T> Matcher<T>any(java.lang.Class<T> type) +
      Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object.
      +
      static <T> AnyOf<T>anyOf(java.lang.Iterable<Matcher<? super T>> matchers) +
      Creates a matcher that matches if the examined object matches ANY of the specified matchers.
      +
      static <T> AnyOf<T>anyOf(Matcher<? super T>... matchers) +
      Creates a matcher that matches if the examined object matches ANY of the specified matchers.
      +
      static <T> AnyOf<T>anyOf(Matcher<T> first, + Matcher<? super T> second) +
      Creates a matcher that matches if the examined object matches ANY of the specified matchers.
      +
      static <T> AnyOf<T>anyOf(Matcher<T> first, + Matcher<? super T> second, + Matcher<? super T> third) +
      Creates a matcher that matches if the examined object matches ANY of the specified matchers.
      +
      static <T> AnyOf<T>anyOf(Matcher<T> first, + Matcher<? super T> second, + Matcher<? super T> third, + Matcher<? super T> fourth) +
      Creates a matcher that matches if the examined object matches ANY of the specified matchers.
      +
      static <T> AnyOf<T>anyOf(Matcher<T> first, + Matcher<? super T> second, + Matcher<? super T> third, + Matcher<? super T> fourth, + Matcher<? super T> fifth) +
      Creates a matcher that matches if the examined object matches ANY of the specified matchers.
      +
      static <T> AnyOf<T>anyOf(Matcher<T> first, + Matcher<? super T> second, + Matcher<? super T> third, + Matcher<? super T> fourth, + Matcher<? super T> fifth, + Matcher<? super T> sixth) +
      Creates a matcher that matches if the examined object matches ANY of the specified matchers.
      +
      static Matcher<java.lang.Object>anything() +
      Creates a matcher that always matches, regardless of the examined object.
      +
      static Matcher<java.lang.Object>anything(java.lang.String description) +
      Creates a matcher that always matches, regardless of the examined object, but describes + itself with the specified String.
      +
      static <T> IsArray<T>array(Matcher<? super T>... elementMatchers) +
      Creates a matcher that matches arrays whose elements are satisfied by the specified matchers.
      +
      static <E> Matcher<E[]>arrayContaining(E... items) +
      Creates a matcher for arrays that matches when each item in the examined array is + logically equal to the corresponding item in the specified items.
      +
      static <E> Matcher<E[]>arrayContaining(java.util.List<Matcher<? super E>> itemMatchers) +
      Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified list of matchers.
      +
      static <E> Matcher<E[]>arrayContaining(Matcher<? super E>... itemMatchers) +
      Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified matchers.
      +
      static <E> Matcher<E[]>arrayContainingInAnyOrder(java.util.Collection<Matcher<? super E>> itemMatchers) +
      + Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified collection of matchers.
      +
      static <E> Matcher<E[]>arrayContainingInAnyOrder(E... items) +
      Creates an order agnostic matcher for arrays that matches when each item in the + examined array is logically equal to one item anywhere in the specified items.
      +
      static <E> Matcher<E[]>arrayContainingInAnyOrder(Matcher<? super E>... itemMatchers) +
      + Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified matchers.
      +
      static <E> Matcher<E[]>arrayWithSize(int size) +
      Creates a matcher for arrays that matches when the length of the array + equals the specified size.
      +
      static <E> Matcher<E[]>arrayWithSize(Matcher<? super java.lang.Integer> sizeMatcher) +
      Creates a matcher for arrays that matches when the length of the array + satisfies the specified matcher.
      +
      static Matcher<java.lang.String>blankOrNullString() +
      Creates a matcher of String that matches when the examined string is null, or + contains zero or more whitespace characters and nothing else.
      +
      static Matcher<java.lang.String>blankString() +
      Creates a matcher of String that matches when the examined string contains + zero or more whitespace characters and nothing else.
      +
      static <LHS> CombinableMatcher.CombinableBothMatcher<LHS>both(Matcher<? super LHS> matcher) +
      Creates a matcher that matches when both of the specified matchers match the examined object.
      +
      static Matcher<java.math.BigDecimal>closeTo(java.math.BigDecimal operand, + java.math.BigDecimal error) +
      Creates a matcher of BigDecimals that matches when an examined BigDecimal is equal + to the specified operand, within a range of +/- error.
      +
      static Matcher<java.lang.Double>closeTo(double operand, + double error) +
      Creates a matcher of Doubles that matches when an examined double is equal + to the specified operand, within a range of +/- error.
      +
      static <T extends java.lang.Comparable<T>>
      Matcher<T>
      comparesEqualTo(T value) +
      Creates a matcher of Comparable object that matches when the examined object is + equal to the specified value, as reported by the compareTo method of the + examined object.
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>contains(E... items) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each logically equal to the + corresponding item in the specified items.
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>contains(java.util.List<Matcher<? super E>> itemMatchers) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each satisfying the corresponding + matcher in the specified list of matchers.
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>contains(Matcher<? super E>... itemMatchers) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each satisfying the corresponding + matcher in the specified matchers.
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>contains(Matcher<? super E> itemMatcher) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a single item that satisfies the specified matcher.
      +
      static <T> Matcher<java.lang.Iterable<? extends T>>containsInAnyOrder(java.util.Collection<Matcher<? super T>> itemMatchers) +
      + Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each satisfying one matcher anywhere + in the specified collection of matchers.
      +
      static <T> Matcher<java.lang.Iterable<? extends T>>containsInAnyOrder(Matcher<? super T>... itemMatchers) +
      + Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each satisfying one matcher anywhere + in the specified matchers.
      +
      static <T> Matcher<java.lang.Iterable<? extends T>>containsInAnyOrder(T... items) +
      + Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each logically equal to one item + anywhere in the specified items.
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>containsInRelativeOrder(E... items) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that contains items logically equal to the + corresponding item in the specified items, in the same relative order + For example:
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>containsInRelativeOrder(java.util.List<Matcher<? super E>> itemMatchers) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that contains items satisfying the corresponding + matcher in the specified list of matchers, in the same relative order.
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>containsInRelativeOrder(Matcher<? super E>... itemMatchers) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that each satisfying the corresponding + matcher in the specified matchers, in the same relative order.
      +
      static Matcher<java.lang.String>containsString(java.lang.String substring) +
      Creates a matcher that matches if the examined String contains the specified + String anywhere.
      +
      static Matcher<java.lang.String>containsStringIgnoringCase(java.lang.String substring) +
      Creates a matcher that matches if the examined String contains the specified + String anywhere, ignoring case.
      +
      static <T> Matcher<T>describedAs(java.lang.String description, + Matcher<T> matcher, + java.lang.Object... values) +
      Wraps an existing matcher, overriding its description with that specified.
      +
      static <LHS> CombinableMatcher.CombinableEitherMatcher<LHS>either(Matcher<? super LHS> matcher) +
      Creates a matcher that matches when either of the specified matchers match the examined object.
      +
      static <E> Matcher<java.util.Collection<? extends E>>empty() +
      Creates a matcher for Collections matching examined collections whose isEmpty + method returns true.
      +
      static <E> Matcher<E[]>emptyArray() +
      Creates a matcher for arrays that matches when the length of the array + is zero.
      +
      static <E> Matcher<java.util.Collection<E>>emptyCollectionOf(java.lang.Class<E> unusedToForceReturnType) +
      Creates a matcher for Collections matching examined collections whose isEmpty + method returns true.
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>emptyIterable() +
      Creates a matcher for Iterables matching examined iterables that yield no items.
      +
      static <E> Matcher<java.lang.Iterable<E>>emptyIterableOf(java.lang.Class<E> unusedToForceReturnType) +
      Creates a matcher for Iterables matching examined iterables that yield no items.
      +
      static Matcher<java.lang.String>emptyOrNullString() +
      Creates a matcher of String that matches when the examined string is null, or + has zero length.
      +
      static Matcher<java.lang.String>emptyString() +
      Creates a matcher of String that matches when the examined string has zero length.
      +
      static Matcher<java.lang.String>endsWith(java.lang.String suffix) +
      Creates a matcher that matches if the examined String ends with the specified + String.
      +
      static Matcher<java.lang.String>endsWithIgnoringCase(java.lang.String suffix) +
      Creates a matcher that matches if the examined String ends with the specified + String, ignoring case.
      +
      static <T> Matcher<T>equalTo(T operand) +
      Creates a matcher that matches when the examined object is logically equal to the specified + operand, as determined by calling the Object.equals(java.lang.Object) method on + the examined object.
      +
      static Matcher<java.lang.String>equalToCompressingWhiteSpace(java.lang.String expectedString) +
      Creates a matcher of String that matches when the examined string is equal to + the specified expectedString, when whitespace differences are (mostly) ignored.
      +
      static Matcher<java.lang.String>equalToIgnoringCase(java.lang.String expectedString) +
      Creates a matcher of String that matches when the examined string is equal to + the specified expectedString, ignoring case.
      +
      static Matcher<java.lang.String>equalToIgnoringWhiteSpace(java.lang.String expectedString) + +
      static Matcher<java.lang.Object>equalToObject(java.lang.Object operand) +
      Creates an IsEqual matcher that does not enforce the values being + compared to be of the same static type.
      +
      static Matcher<java.util.EventObject>eventFrom(java.lang.Class<? extends java.util.EventObject> eventClass, + java.lang.Object source) +
      Creates a matcher of EventObject that matches any object + derived from eventClass announced by source.
      +
      static Matcher<java.util.EventObject>eventFrom(java.lang.Object source) +
      Creates a matcher of EventObject that matches any EventObject + announced by source.
      +
      static <U> Matcher<java.lang.Iterable<? extends U>>everyItem(Matcher<U> itemMatcher) +
      Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields items that are all matched by the specified + itemMatcher.
      +
      static <T extends java.lang.Comparable<T>>
      Matcher<T>
      greaterThan(T value) +
      Creates a matcher of Comparable object that matches when the examined object is + greater than the specified value, as reported by the compareTo method of the + examined object.
      +
      static <T extends java.lang.Comparable<T>>
      Matcher<T>
      greaterThanOrEqualTo(T value) +
      Creates a matcher of Comparable object that matches when the examined object is + greater than or equal to the specified value, as reported by the compareTo method + of the examined object.
      +
      static <K,V> Matcher<java.util.Map<? extends K,? extends V>>hasEntry(K key, + V value) +
      Creates a matcher for Maps matching when the examined Map contains + at least one entry whose key equals the specified key and whose value equals the + specified value.
      +
      static <K,V> Matcher<java.util.Map<? extends K,? extends V>>hasEntry(Matcher<? super K> keyMatcher, + Matcher<? super V> valueMatcher) +
      Creates a matcher for Maps matching when the examined Map contains + at least one entry whose key satisfies the specified keyMatcher and whose + value satisfies the specified valueMatcher.
      +
      static <T> Matcher<java.lang.Iterable<? super T>>hasItem(Matcher<? super T> itemMatcher) +
      Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is matched by the specified + itemMatcher.
      +
      static <T> Matcher<java.lang.Iterable<? super T>>hasItem(T item) +
      Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is equal to the specified + item.
      +
      static <T> Matcher<T[]>hasItemInArray(Matcher<? super T> elementMatcher) +
      Creates a matcher for arrays that matches when the examined array contains at least one item + that is matched by the specified elementMatcher.
      +
      static <T> Matcher<T[]>hasItemInArray(T element) +
      A shortcut to the frequently used hasItemInArray(equalTo(x)).
      +
      static <T> Matcher<java.lang.Iterable<T>>hasItems(Matcher<? super T>... itemMatchers) +
      Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is matched by the corresponding + matcher from the specified itemMatchers.
      +
      static <T> Matcher<java.lang.Iterable<T>>hasItems(T... items) +
      Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is equal to the corresponding + item from the specified items.
      +
      static <K> Matcher<java.util.Map<? extends K,?>>hasKey(K key) +
      Creates a matcher for Maps matching when the examined Map contains + at least one key that is equal to the specified key.
      +
      static <K> Matcher<java.util.Map<? extends K,?>>hasKey(Matcher<? super K> keyMatcher) +
      Creates a matcher for Maps matching when the examined Map contains + at least one key that satisfies the specified matcher.
      +
      static Matcher<java.lang.CharSequence>hasLength(int length) +
      Creates a matcher of CharSequence that matches when a char sequence has the length + of the specified argument.
      +
      static <T> Matcher<T>hasProperty(java.lang.String propertyName) +
      Creates a matcher that matches when the examined object has a JavaBean property + with the specified name.
      +
      static <T> Matcher<T>hasProperty(java.lang.String propertyName, + Matcher<?> valueMatcher) +
      Creates a matcher that matches when the examined object has a JavaBean property + with the specified name whose value satisfies the specified matcher.
      +
      static <E> Matcher<java.util.Collection<? extends E>>hasSize(int size) +
      Creates a matcher for Collections that matches when the size() method returns + a value equal to the specified size.
      +
      static <E> Matcher<java.util.Collection<? extends E>>hasSize(Matcher<? super java.lang.Integer> sizeMatcher) +
      Creates a matcher for Collections that matches when the size() method returns + a value that satisfies the specified matcher.
      +
      static <T> Matcher<T>hasToString(Matcher<? super java.lang.String> toStringMatcher) +
      Creates a matcher that matches any examined object whose toString method + returns a value that satisfies the specified matcher.
      +
      static <T> Matcher<T>hasToString(java.lang.String expectedToString) +
      Creates a matcher that matches any examined object whose toString method + returns a value equalTo the specified string.
      +
      static <V> Matcher<java.util.Map<?,? extends V>>hasValue(Matcher<? super V> valueMatcher) +
      Creates a matcher for Maps matching when the examined Map contains + at least one value that satisfies the specified valueMatcher.
      +
      static <V> Matcher<java.util.Map<?,? extends V>>hasValue(V value) +
      Creates a matcher for Maps matching when the examined Map contains + at least one value that is equal to the specified value.
      +
      static Matcher<org.w3c.dom.Node>hasXPath(java.lang.String xPath) +
      Creates a matcher of Nodes that matches when the examined node contains a node + at the specified xPath, with any content.
      +
      static Matcher<org.w3c.dom.Node>hasXPath(java.lang.String xPath, + Matcher<java.lang.String> valueMatcher) +
      Creates a matcher of Nodes that matches when the examined node has a value at the + specified xPath that satisfies the specified valueMatcher.
      +
      static Matcher<org.w3c.dom.Node>hasXPath(java.lang.String xPath, + javax.xml.namespace.NamespaceContext namespaceContext) +
      Creates a matcher of Nodes that matches when the examined node contains a node + at the specified xPath within the specified namespace context, with any content.
      +
      static Matcher<org.w3c.dom.Node>hasXPath(java.lang.String xPath, + javax.xml.namespace.NamespaceContext namespaceContext, + Matcher<java.lang.String> valueMatcher) +
      Creates a matcher of Nodes that matches when the examined node has a value at the + specified xPath, within the specified namespaceContext, that satisfies + the specified valueMatcher.
      +
      static <T> Matcher<T>in(java.util.Collection<T> collection) +
      Creates a matcher that matches when the examined object is found within the + specified collection.
      +
      static <T> Matcher<T>in(T[] elements) +
      Creates a matcher that matches when the examined object is found within the + specified array.
      +
      static <T> Matcher<T>instanceOf(java.lang.Class<?> type) +
      Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object.
      +
      static <T> Matcher<T>is(Matcher<T> matcher) +
      Decorates another Matcher, retaining its behaviour, but allowing tests + to be slightly more expressive.
      +
      static <T> Matcher<T>is(T value) +
      A shortcut to the frequently used is(equalTo(x)).
      +
      static <T> Matcher<T>isA(java.lang.Class<?> type) +
      A shortcut to the frequently used is(instanceOf(SomeClass.class)).
      +
      static Matcher<java.lang.String>isEmptyOrNullString() +
      Deprecated.  +
      use is(emptyOrNullString()) instead
      +
      +
      static Matcher<java.lang.String>isEmptyString() +
      Deprecated.  +
      use is(emptyString()) instead
      +
      +
      static <T> Matcher<T>isIn(java.util.Collection<T> collection) +
      Deprecated.  +
      use is(in(...)) instead
      +
      +
      static <T> Matcher<T>isIn(T[] elements) +
      Deprecated.  +
      use is(in(...)) instead
      +
      +
      static <T> Matcher<T>isOneOf(T... elements) +
      Deprecated.  +
      use is(oneOf(...)) instead
      +
      +
      static <E> Matcher<java.lang.Iterable<E>>iterableWithSize(int size) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields an item count that is equal to the specified + size argument.
      +
      static <E> Matcher<java.lang.Iterable<E>>iterableWithSize(Matcher<? super java.lang.Integer> sizeMatcher) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields an item count that satisfies the specified + matcher.
      +
      static <T extends java.lang.Comparable<T>>
      Matcher<T>
      lessThan(T value) +
      Creates a matcher of Comparable object that matches when the examined object is + less than the specified value, as reported by the compareTo method of the + examined object.
      +
      static <T extends java.lang.Comparable<T>>
      Matcher<T>
      lessThanOrEqualTo(T value) +
      Creates a matcher of Comparable object that matches when the examined object is + less than or equal to the specified value, as reported by the compareTo method + of the examined object.
      +
      static Matcher<java.lang.String>matchesPattern(java.util.regex.Pattern pattern) +
      Creates a matcher of String that matches when the examined string + exactly matches the given Pattern.
      +
      static Matcher<java.lang.String>matchesPattern(java.lang.String regex) +
      Creates a matcher of String that matches when the examined string + exactly matches the given regular expression, treated as a Pattern.
      +
      static Matcher<java.lang.String>matchesRegex(java.util.regex.Pattern pattern) +
      Validate a string with a Pattern.
      +
      static Matcher<java.lang.String>matchesRegex(java.lang.String regex) +
      Validate a string with a regex.
      +
      static <T> Matcher<T>not(Matcher<T> matcher) +
      Creates a matcher that wraps an existing matcher, but inverts the logic by which + it will match.
      +
      static <T> Matcher<T>not(T value) +
      A shortcut to the frequently used not(equalTo(x)).
      +
      static Matcher<java.lang.Double>notANumber() +
      Creates a matcher of Doubles that matches when an examined double is not a number.
      +
      static Matcher<java.lang.Object>notNullValue() +
      A shortcut to the frequently used not(nullValue()).
      +
      static <T> Matcher<T>notNullValue(java.lang.Class<T> type) +
      A shortcut to the frequently used not(nullValue(X.class)).
      +
      static Matcher<java.lang.Object>nullValue() +
      Creates a matcher that matches if examined object is null.
      +
      static <T> Matcher<T>nullValue(java.lang.Class<T> type) +
      Creates a matcher that matches if examined object is null.
      +
      static <T> Matcher<T>oneOf(T... elements) +
      Creates a matcher that matches when the examined object is equal to one of the + specified elements.
      +
      static <T> Matcher<T>sameInstance(T target) +
      Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
      +
      static <B> Matcher<B>samePropertyValuesAs(B expectedBean, + java.lang.String... ignoredProperties) +
      Creates a matcher that matches when the examined object has values for all of + its JavaBean properties that are equal to the corresponding values of the + specified bean.
      +
      static Matcher<java.lang.String>startsWith(java.lang.String prefix) +
      + Creates a matcher that matches if the examined String starts with the specified + String.
      +
      static Matcher<java.lang.String>startsWithIgnoringCase(java.lang.String prefix) +
      + Creates a matcher that matches if the examined String starts with the specified + String, ignoring case
      +
      static Matcher<java.lang.String>stringContainsInOrder(java.lang.Iterable<java.lang.String> substrings) +
      Creates a matcher of String that matches when the examined string contains all of + the specified substrings, considering the order of their appearance.
      +
      static Matcher<java.lang.String>stringContainsInOrder(java.lang.String... substrings) +
      Creates a matcher of String that matches when the examined string contains all of + the specified substrings, considering the order of their appearance.
      +
      static <T> Matcher<T>theInstance(T target) +
      Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
      +
      static <T> Matcher<java.lang.Class<?>>typeCompatibleWith(java.lang.Class<T> baseType) +
      Creates a matcher of Class that matches when the specified baseType is + assignable from the examined class.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Matchers

        +
        public Matchers()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        allOf

        +
        public static <T> Matcher<T> allOf(java.lang.Iterable<Matcher<? super T>> matchers)
        +
        Creates a matcher that matches if the examined object matches ALL of the specified matchers. + For example: +
        assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        allOf

        +
        @SafeVarargs
        +public static <T> Matcher<T> allOf(Matcher<? super T>... matchers)
        +
        Creates a matcher that matches if the examined object matches ALL of the specified matchers. + For example: +
        assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        allOf

        +
        public static <T> Matcher<T> allOf(Matcher<? super T> first,
        +                                   Matcher<? super T> second)
        +
        Creates a matcher that matches if the examined object matches ALL of the specified matchers. + For example: +
        assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        allOf

        +
        public static <T> Matcher<T> allOf(Matcher<? super T> first,
        +                                   Matcher<? super T> second,
        +                                   Matcher<? super T> third)
        +
        Creates a matcher that matches if the examined object matches ALL of the specified matchers. + For example: +
        assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        allOf

        +
        public static <T> Matcher<T> allOf(Matcher<? super T> first,
        +                                   Matcher<? super T> second,
        +                                   Matcher<? super T> third,
        +                                   Matcher<? super T> fourth)
        +
        Creates a matcher that matches if the examined object matches ALL of the specified matchers. + For example: +
        assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        allOf

        +
        public static <T> Matcher<T> allOf(Matcher<? super T> first,
        +                                   Matcher<? super T> second,
        +                                   Matcher<? super T> third,
        +                                   Matcher<? super T> fourth,
        +                                   Matcher<? super T> fifth)
        +
        Creates a matcher that matches if the examined object matches ALL of the specified matchers. + For example: +
        assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        allOf

        +
        public static <T> Matcher<T> allOf(Matcher<? super T> first,
        +                                   Matcher<? super T> second,
        +                                   Matcher<? super T> third,
        +                                   Matcher<? super T> fourth,
        +                                   Matcher<? super T> fifth,
        +                                   Matcher<? super T> sixth)
        +
        Creates a matcher that matches if the examined object matches ALL of the specified matchers. + For example: +
        assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(java.lang.Iterable<Matcher<? super T>> matchers)
        +
        Creates a matcher that matches if the examined object matches ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        @SafeVarargs
        +public static <T> AnyOf<T> anyOf(Matcher<? super T>... matchers)
        +
        Creates a matcher that matches if the examined object matches ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(Matcher<T> first,
        +                                 Matcher<? super T> second)
        +
        Creates a matcher that matches if the examined object matches ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(Matcher<T> first,
        +                                 Matcher<? super T> second,
        +                                 Matcher<? super T> third)
        +
        Creates a matcher that matches if the examined object matches ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(Matcher<T> first,
        +                                 Matcher<? super T> second,
        +                                 Matcher<? super T> third,
        +                                 Matcher<? super T> fourth)
        +
        Creates a matcher that matches if the examined object matches ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(Matcher<T> first,
        +                                 Matcher<? super T> second,
        +                                 Matcher<? super T> third,
        +                                 Matcher<? super T> fourth,
        +                                 Matcher<? super T> fifth)
        +
        Creates a matcher that matches if the examined object matches ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(Matcher<T> first,
        +                                 Matcher<? super T> second,
        +                                 Matcher<? super T> third,
        +                                 Matcher<? super T> fourth,
        +                                 Matcher<? super T> fifth,
        +                                 Matcher<? super T> sixth)
        +
        Creates a matcher that matches if the examined object matches ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        both

        +
        public static <LHS> CombinableMatcher.CombinableBothMatcher<LHS> both(Matcher<? super LHS> matcher)
        +
        Creates a matcher that matches when both of the specified matchers match the examined object. + For example: +
        assertThat("fab", both(containsString("a")).and(containsString("b")))
        +
      • +
      + + + +
        +
      • +

        either

        +
        public static <LHS> CombinableMatcher.CombinableEitherMatcher<LHS> either(Matcher<? super LHS> matcher)
        +
        Creates a matcher that matches when either of the specified matchers match the examined object. + For example: +
        assertThat("fan", either(containsString("a")).or(containsString("b")))
        +
      • +
      + + + +
        +
      • +

        describedAs

        +
        public static <T> Matcher<T> describedAs(java.lang.String description,
        +                                         Matcher<T> matcher,
        +                                         java.lang.Object... values)
        +
        Wraps an existing matcher, overriding its description with that specified. All other functions are + delegated to the decorated matcher, including its mismatch description. + For example: +
        describedAs("a big decimal equal to %0", equalTo(myBigDecimal), myBigDecimal.toPlainString())
        +
        +
        Parameters:
        +
        description - the new description for the wrapped matcher
        +
        matcher - the matcher to wrap
        +
        values - optional values to insert into the tokenized description
        +
        +
      • +
      + + + +
        +
      • +

        everyItem

        +
        public static <U> Matcher<java.lang.Iterable<? extends U>> everyItem(Matcher<U> itemMatcher)
        +
        Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields items that are all matched by the specified + itemMatcher. + For example: +
        assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))
        +
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to every item provided by the examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        is

        +
        public static <T> Matcher<T> is(Matcher<T> matcher)
        +
        Decorates another Matcher, retaining its behaviour, but allowing tests + to be slightly more expressive. + For example: +
        assertThat(cheese, is(equalTo(smelly)))
        + instead of: +
        assertThat(cheese, equalTo(smelly))
        +
      • +
      + + + + + +
        +
      • +

        is

        +
        public static <T> Matcher<T> is(T value)
        +
        A shortcut to the frequently used is(equalTo(x)). + For example: +
        assertThat(cheese, is(smelly))
        + instead of: +
        assertThat(cheese, is(equalTo(smelly)))
        +
      • +
      + + + +
        +
      • +

        isA

        +
        public static <T> Matcher<T> isA(java.lang.Class<?> type)
        +
        A shortcut to the frequently used is(instanceOf(SomeClass.class)). + For example: +
        assertThat(cheese, isA(Cheddar.class))
        + instead of: +
        assertThat(cheese, is(instanceOf(Cheddar.class)))
        +
      • +
      + + + +
        +
      • +

        anything

        +
        public static Matcher<java.lang.Object> anything()
        +
        Creates a matcher that always matches, regardless of the examined object.
        +
      • +
      + + + +
        +
      • +

        anything

        +
        public static Matcher<java.lang.Object> anything(java.lang.String description)
        +
        Creates a matcher that always matches, regardless of the examined object, but describes + itself with the specified String.
        +
        +
        Parameters:
        +
        description - a meaningful String used when describing itself
        +
        +
      • +
      + + + +
        +
      • +

        hasItem

        +
        public static <T> Matcher<java.lang.Iterable<? super T>> hasItem(Matcher<? super T> itemMatcher)
        +
        Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is matched by the specified + itemMatcher. Whilst matching, the traversal of the examined Iterable + will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar"), hasItem(startsWith("ba")))
        +
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to items provided by the examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        hasItem

        +
        public static <T> Matcher<java.lang.Iterable<? super T>> hasItem(T item)
        +
        Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is equal to the specified + item. Whilst matching, the traversal of the examined Iterable + will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar"), hasItem("bar"))
        +
        +
        Parameters:
        +
        item - the item to compare against the items provided by the examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        hasItems

        +
        @SafeVarargs
        +public static <T> Matcher<java.lang.Iterable<T>> hasItems(Matcher<? super T>... itemMatchers)
        +
        Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is matched by the corresponding + matcher from the specified itemMatchers. Whilst matching, each traversal of + the examined Iterable will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar", "baz"), hasItems(endsWith("z"), endsWith("o")))
        +
        +
        Parameters:
        +
        itemMatchers - the matchers to apply to items provided by the examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        hasItems

        +
        @SafeVarargs
        +public static <T> Matcher<java.lang.Iterable<T>> hasItems(T... items)
        +
        Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is equal to the corresponding + item from the specified items. Whilst matching, each traversal of the + examined Iterable will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar", "baz"), hasItems("baz", "foo"))
        +
        +
        Parameters:
        +
        items - the items to compare against the items provided by the examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        equalTo

        +
        public static <T> Matcher<T> equalTo(T operand)
        +
        Creates a matcher that matches when the examined object is logically equal to the specified + operand, as determined by calling the Object.equals(java.lang.Object) method on + the examined object. + +

        If the specified operand is null then the created matcher will only match if + the examined object's equals method returns true when passed a + null (which would be a violation of the equals contract), unless the + examined object itself is null, in which case the matcher will return a positive + match.

        + +

        The created matcher provides a special behaviour when examining Arrays, whereby + it will match if both the operand and the examined object are arrays of the same length and + contain items that are equal to each other (according to the above rules) in the same + indexes.

        + For example: +
        + assertThat("foo", equalTo("foo"));
        + assertThat(new String[] {"foo", "bar"}, equalTo(new String[] {"foo", "bar"}));
        + 
        +
      • +
      + + + +
        +
      • +

        equalToObject

        +
        public static Matcher<java.lang.Object> equalToObject(java.lang.Object operand)
        +
        Creates an IsEqual matcher that does not enforce the values being + compared to be of the same static type.
        +
      • +
      + + + +
        +
      • +

        any

        +
        public static <T> Matcher<T> any(java.lang.Class<T> type)
        +
        Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object. + +

        The created matcher forces a relationship between specified type and the examined object, and should be + used when it is necessary to make generics conform, for example in the JMock clause + with(any(Thing.class))

        + For example: +
        assertThat(new Canoe(), instanceOf(Canoe.class));
        +
      • +
      + + + +
        +
      • +

        instanceOf

        +
        public static <T> Matcher<T> instanceOf(java.lang.Class<?> type)
        +
        Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object. + +

        The created matcher assumes no relationship between specified type and the examined object.

        + For example: +
        assertThat(new Canoe(), instanceOf(Paddlable.class));
        +
      • +
      + + + +
        +
      • +

        not

        +
        public static <T> Matcher<T> not(Matcher<T> matcher)
        +
        Creates a matcher that wraps an existing matcher, but inverts the logic by which + it will match. + For example: +
        assertThat(cheese, is(not(equalTo(smelly))))
        +
        +
        Parameters:
        +
        matcher - the matcher whose sense should be inverted
        +
        +
      • +
      + + + + + +
        +
      • +

        not

        +
        public static <T> Matcher<T> not(T value)
        +
        A shortcut to the frequently used not(equalTo(x)). + For example: +
        assertThat(cheese, is(not(smelly)))
        + instead of: +
        assertThat(cheese, is(not(equalTo(smelly))))
        +
        +
        Parameters:
        +
        value - the value that any examined object should not equal
        +
        +
      • +
      + + + +
        +
      • +

        notNullValue

        +
        public static Matcher<java.lang.Object> notNullValue()
        +
        A shortcut to the frequently used not(nullValue()). + For example: +
        assertThat(cheese, is(notNullValue()))
        + instead of: +
        assertThat(cheese, is(not(nullValue())))
        +
      • +
      + + + +
        +
      • +

        notNullValue

        +
        public static <T> Matcher<T> notNullValue(java.lang.Class<T> type)
        +
        A shortcut to the frequently used not(nullValue(X.class)). Accepts a + single dummy argument to facilitate type inference.. + For example: +
        assertThat(cheese, is(notNullValue(X.class)))
        + instead of: +
        assertThat(cheese, is(not(nullValue(X.class))))
        +
        +
        Parameters:
        +
        type - dummy parameter used to infer the generic type of the returned matcher
        +
        +
      • +
      + + + +
        +
      • +

        nullValue

        +
        public static Matcher<java.lang.Object> nullValue()
        +
        Creates a matcher that matches if examined object is null. + For example: +
        assertThat(cheese, is(nullValue())
        +
      • +
      + + + +
        +
      • +

        nullValue

        +
        public static <T> Matcher<T> nullValue(java.lang.Class<T> type)
        +
        Creates a matcher that matches if examined object is null. Accepts a + single dummy argument to facilitate type inference. + For example: +
        assertThat(cheese, is(nullValue(Cheese.class))
        +
        +
        Parameters:
        +
        type - dummy parameter used to infer the generic type of the returned matcher
        +
        +
      • +
      + + + + + +
        +
      • +

        sameInstance

        +
        public static <T> Matcher<T> sameInstance(T target)
        +
        Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
        +
        +
        Parameters:
        +
        target - the target instance against which others should be assessed
        +
        +
      • +
      + + + + + +
        +
      • +

        theInstance

        +
        public static <T> Matcher<T> theInstance(T target)
        +
        Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
        +
        +
        Parameters:
        +
        target - the target instance against which others should be assessed
        +
        +
      • +
      + + + +
        +
      • +

        containsString

        +
        public static Matcher<java.lang.String> containsString(java.lang.String substring)
        +
        Creates a matcher that matches if the examined String contains the specified + String anywhere. + For example: +
        assertThat("myStringOfNote", containsString("ring"))
        +
        +
        Parameters:
        +
        substring - the substring that the returned matcher will expect to find within any examined string
        +
        +
      • +
      + + + +
        +
      • +

        containsStringIgnoringCase

        +
        public static Matcher<java.lang.String> containsStringIgnoringCase(java.lang.String substring)
        +
        Creates a matcher that matches if the examined String contains the specified + String anywhere, ignoring case. + For example: +
        assertThat("myStringOfNote", containsStringIgnoringCase("Ring"))
        +
        +
        Parameters:
        +
        substring - the substring that the returned matcher will expect to find within any examined string
        +
        +
      • +
      + + + +
        +
      • +

        startsWith

        +
        public static Matcher<java.lang.String> startsWith(java.lang.String prefix)
        +

        + Creates a matcher that matches if the examined String starts with the specified + String. +

        + For example: +
        assertThat("myStringOfNote", startsWith("my"))
        +
        +
        Parameters:
        +
        prefix - the substring that the returned matcher will expect at the start of any examined string
        +
        +
      • +
      + + + +
        +
      • +

        startsWithIgnoringCase

        +
        public static Matcher<java.lang.String> startsWithIgnoringCase(java.lang.String prefix)
        +

        + Creates a matcher that matches if the examined String starts with the specified + String, ignoring case +

        + For example: +
        assertThat("myStringOfNote", startsWithIgnoringCase("My"))
        +
        +
        Parameters:
        +
        prefix - the substring that the returned matcher will expect at the start of any examined string
        +
        +
      • +
      + + + +
        +
      • +

        endsWith

        +
        public static Matcher<java.lang.String> endsWith(java.lang.String suffix)
        +
        Creates a matcher that matches if the examined String ends with the specified + String. + For example: +
        assertThat("myStringOfNote", endsWith("Note"))
        +
        +
        Parameters:
        +
        suffix - the substring that the returned matcher will expect at the end of any examined string
        +
        +
      • +
      + + + +
        +
      • +

        endsWithIgnoringCase

        +
        public static Matcher<java.lang.String> endsWithIgnoringCase(java.lang.String suffix)
        +
        Creates a matcher that matches if the examined String ends with the specified + String, ignoring case. + For example: +
        assertThat("myStringOfNote", endsWithIgnoringCase("note"))
        +
        +
        Parameters:
        +
        suffix - the substring that the returned matcher will expect at the end of any examined string
        +
        +
      • +
      + + + +
        +
      • +

        matchesRegex

        +
        public static Matcher<java.lang.String> matchesRegex(java.util.regex.Pattern pattern)
        +
        Validate a string with a Pattern. + +
        + assertThat("abc", matchesRegex(Pattern.compile("ˆ[a-z]$"));
        + 
        +
        +
        Parameters:
        +
        pattern - the pattern to be used.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        matchesRegex

        +
        public static Matcher<java.lang.String> matchesRegex(java.lang.String regex)
        +
        Validate a string with a regex. + +
        + assertThat("abc", matchesRegex("ˆ[a-z]+$"));
        + 
        +
        +
        Parameters:
        +
        regex - The regex to be used for the validation.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        array

        +
        @SafeVarargs
        +public static <T> IsArray<T> array(Matcher<? super T>... elementMatchers)
        +
        Creates a matcher that matches arrays whose elements are satisfied by the specified matchers. Matches + positively only if the number of matchers specified is equal to the length of the examined array and + each matcher[i] is satisfied by array[i]. + For example: +
        assertThat(new Integer[]{1,2,3}, is(array(equalTo(1), equalTo(2), equalTo(3))))
        +
        +
        Parameters:
        +
        elementMatchers - the matchers that the elements of examined arrays should satisfy
        +
        +
      • +
      + + + +
        +
      • +

        hasItemInArray

        +
        public static <T> Matcher<T[]> hasItemInArray(Matcher<? super T> elementMatcher)
        +
        Creates a matcher for arrays that matches when the examined array contains at least one item + that is matched by the specified elementMatcher. Whilst matching, the traversal + of the examined array will stop as soon as a matching element is found. + For example: +
        assertThat(new String[] {"foo", "bar"}, hasItemInArray(startsWith("ba")))
        +
        +
        Parameters:
        +
        elementMatcher - the matcher to apply to elements in examined arrays
        +
        +
      • +
      + + + + + +
        +
      • +

        hasItemInArray

        +
        public static <T> Matcher<T[]> hasItemInArray(T element)
        +
        A shortcut to the frequently used hasItemInArray(equalTo(x)). + For example: +
        assertThat(hasItemInArray(x))
        + instead of: +
        assertThat(hasItemInArray(equalTo(x)))
        +
        +
        Parameters:
        +
        element - the element that should be present in examined arrays
        +
        +
      • +
      + + + + + +
        +
      • +

        arrayContaining

        +
        @SafeVarargs
        +public static <E> Matcher<E[]> arrayContaining(E... items)
        +
        Creates a matcher for arrays that matches when each item in the examined array is + logically equal to the corresponding item in the specified items. For a positive match, + the examined array must be of the same length as the number of specified items. + For example: +
        assertThat(new String[]{"foo", "bar"}, arrayContaining("foo", "bar"))
        +
        +
        Parameters:
        +
        items - the items that must equal the items within an examined array
        +
        +
      • +
      + + + +
        +
      • +

        arrayContaining

        +
        @SafeVarargs
        +public static <E> Matcher<E[]> arrayContaining(Matcher<? super E>... itemMatchers)
        +
        Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified matchers. For a positive match, the examined array + must be of the same length as the number of specified matchers. + For example: +
        assertThat(new String[]{"foo", "bar"}, arrayContaining(equalTo("foo"), equalTo("bar")))
        +
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items in the examined array
        +
        +
      • +
      + + + +
        +
      • +

        arrayContaining

        +
        public static <E> Matcher<E[]> arrayContaining(java.util.List<Matcher<? super E>> itemMatchers)
        +
        Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified list of matchers. For a positive match, the examined array + must be of the same length as the specified list of matchers. + For example: +
        assertThat(new String[]{"foo", "bar"}, arrayContaining(Arrays.asList(equalTo("foo"), equalTo("bar"))))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by the corresponding item in an examined array
        +
        +
      • +
      + + + +
        +
      • +

        arrayContainingInAnyOrder

        +
        @SafeVarargs
        +public static <E> Matcher<E[]> arrayContainingInAnyOrder(Matcher<? super E>... itemMatchers)
        +

        + Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified matchers. + For a positive match, the examined array must be of the same length as the number of + specified matchers. +

        +

        + N.B. each of the specified matchers will only be used once during a given examination, so be + careful when specifying matchers that may be satisfied by more than one entry in an examined + array. +

        +

        + For example: +

        +
        assertThat(new String[]{"foo", "bar"}, arrayContainingInAnyOrder(equalTo("bar"), equalTo("foo")))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an entry in an examined array
        +
        +
      • +
      + + + +
        +
      • +

        arrayContainingInAnyOrder

        +
        public static <E> Matcher<E[]> arrayContainingInAnyOrder(java.util.Collection<Matcher<? super E>> itemMatchers)
        +

        + Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified collection of matchers. + For a positive match, the examined array must be of the same length as the specified collection + of matchers. +

        +

        + N.B. each matcher in the specified collection will only be used once during a given + examination, so be careful when specifying matchers that may be satisfied by more than + one entry in an examined array. +

        +

        + For example: +

        +
        assertThat(new String[]{"foo", "bar"}, arrayContainingInAnyOrder(Arrays.asList(equalTo("bar"), equalTo("foo"))))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined array
        +
        +
      • +
      + + + + + +
        +
      • +

        arrayContainingInAnyOrder

        +
        @SafeVarargs
        +public static <E> Matcher<E[]> arrayContainingInAnyOrder(E... items)
        +

        Creates an order agnostic matcher for arrays that matches when each item in the + examined array is logically equal to one item anywhere in the specified items. + For a positive match, the examined array must be of the same length as the number of + specified items. +

        +

        N.B. each of the specified items will only be used once during a given examination, so be + careful when specifying items that may be equal to more than one entry in an examined + array. +

        +

        + For example: +

        +
        assertThat(new String[]{"foo", "bar"}, arrayContainingInAnyOrder("bar", "foo"))
        +
        +
        Parameters:
        +
        items - the items that must equal the entries of an examined array, in any order
        +
        +
      • +
      + + + +
        +
      • +

        arrayWithSize

        +
        public static <E> Matcher<E[]> arrayWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
        +
        Creates a matcher for arrays that matches when the length of the array + satisfies the specified matcher. + For example: +
        assertThat(new String[]{"foo", "bar"}, arrayWithSize(equalTo(2)))
        +
        +
        Parameters:
        +
        sizeMatcher - a matcher for the length of an examined array
        +
        +
      • +
      + + + +
        +
      • +

        arrayWithSize

        +
        public static <E> Matcher<E[]> arrayWithSize(int size)
        +
        Creates a matcher for arrays that matches when the length of the array + equals the specified size. + For example: +
        assertThat(new String[]{"foo", "bar"}, arrayWithSize(2))
        +
        +
        Parameters:
        +
        size - the length that an examined array must have for a positive match
        +
        +
      • +
      + + + +
        +
      • +

        emptyArray

        +
        public static <E> Matcher<E[]> emptyArray()
        +
        Creates a matcher for arrays that matches when the length of the array + is zero. + For example: +
        assertThat(new String[0], emptyArray())
        +
      • +
      + + + +
        +
      • +

        aMapWithSize

        +
        public static <K,V> Matcher<java.util.Map<? extends K,? extends V>> aMapWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
        +
        Creates a matcher for Maps that matches when the size() method returns + a value that satisfies the specified matcher. + For example: +
        assertThat(myMap, is(aMapWithSize(equalTo(2))))
        +
        +
        Parameters:
        +
        sizeMatcher - a matcher for the size of an examined Map
        +
        +
      • +
      + + + +
        +
      • +

        aMapWithSize

        +
        public static <K,V> Matcher<java.util.Map<? extends K,? extends V>> aMapWithSize(int size)
        +
        Creates a matcher for Maps that matches when the size() method returns + a value equal to the specified size. + For example: +
        assertThat(myMap, is(aMapWithSize(2)))
        +
        +
        Parameters:
        +
        size - the expected size of an examined Map
        +
        +
      • +
      + + + +
        +
      • +

        anEmptyMap

        +
        public static <K,V> Matcher<java.util.Map<? extends K,? extends V>> anEmptyMap()
        +
        Creates a matcher for Maps that matches when the size() method returns + zero. + For example: +
        assertThat(myMap, is(anEmptyMap()))
        +
      • +
      + + + +
        +
      • +

        hasSize

        +
        public static <E> Matcher<java.util.Collection<? extends E>> hasSize(Matcher<? super java.lang.Integer> sizeMatcher)
        +
        Creates a matcher for Collections that matches when the size() method returns + a value that satisfies the specified matcher. + For example: +
        assertThat(Arrays.asList("foo", "bar"), hasSize(equalTo(2)))
        +
        +
        Parameters:
        +
        sizeMatcher - a matcher for the size of an examined Collection
        +
        +
      • +
      + + + +
        +
      • +

        hasSize

        +
        public static <E> Matcher<java.util.Collection<? extends E>> hasSize(int size)
        +
        Creates a matcher for Collections that matches when the size() method returns + a value equal to the specified size. + For example: +
        assertThat(Arrays.asList("foo", "bar"), hasSize(2))
        +
        +
        Parameters:
        +
        size - the expected size of an examined Collection
        +
        +
      • +
      + + + +
        +
      • +

        empty

        +
        public static <E> Matcher<java.util.Collection<? extends E>> empty()
        +
        Creates a matcher for Collections matching examined collections whose isEmpty + method returns true. + For example: +
        assertThat(new ArrayList<String>(), is(empty()))
        +
      • +
      + + + +
        +
      • +

        emptyCollectionOf

        +
        public static <E> Matcher<java.util.Collection<E>> emptyCollectionOf(java.lang.Class<E> unusedToForceReturnType)
        +
        Creates a matcher for Collections matching examined collections whose isEmpty + method returns true. + For example: +
        assertThat(new ArrayList<String>(), is(emptyCollectionOf(String.class)))
        +
        +
        Parameters:
        +
        unusedToForceReturnType - the type of the collection's content
        +
        +
      • +
      + + + +
        +
      • +

        emptyIterable

        +
        public static <E> Matcher<java.lang.Iterable<? extends E>> emptyIterable()
        +
        Creates a matcher for Iterables matching examined iterables that yield no items. + For example: +
        assertThat(new ArrayList<String>(), is(emptyIterable()))
        +
      • +
      + + + +
        +
      • +

        emptyIterableOf

        +
        public static <E> Matcher<java.lang.Iterable<E>> emptyIterableOf(java.lang.Class<E> unusedToForceReturnType)
        +
        Creates a matcher for Iterables matching examined iterables that yield no items. + For example: +
        assertThat(new ArrayList<String>(), is(emptyIterableOf(String.class)))
        +
        +
        Parameters:
        +
        unusedToForceReturnType - the type of the iterable's content
        +
        +
      • +
      + + + + + +
        +
      • +

        contains

        +
        @SafeVarargs
        +public static <E> Matcher<java.lang.Iterable<? extends E>> contains(E... items)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each logically equal to the + corresponding item in the specified items. For a positive match, the examined iterable + must be of the same length as the number of specified items. + For example: +
        assertThat(Arrays.asList("foo", "bar"), contains("foo", "bar"))
        +
        +
        Parameters:
        +
        items - the items that must equal the items provided by an examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        contains

        +
        public static <E> Matcher<java.lang.Iterable<? extends E>> contains(Matcher<? super E> itemMatcher)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a single item that satisfies the specified matcher. + For a positive match, the examined iterable must only yield one item. + For example: +
        assertThat(Arrays.asList("foo"), contains(equalTo("foo")))
        +
        +
        Parameters:
        +
        itemMatcher - the matcher that must be satisfied by the single item provided by an + examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        contains

        +
        @SafeVarargs
        +public static <E> Matcher<java.lang.Iterable<? extends E>> contains(Matcher<? super E>... itemMatchers)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each satisfying the corresponding + matcher in the specified matchers. For a positive match, the examined iterable + must be of the same length as the number of specified matchers. + For example: +
        assertThat(Arrays.asList("foo", "bar"), contains(equalTo("foo"), equalTo("bar")))
        +
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items provided by an examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        contains

        +
        public static <E> Matcher<java.lang.Iterable<? extends E>> contains(java.util.List<Matcher<? super E>> itemMatchers)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each satisfying the corresponding + matcher in the specified list of matchers. For a positive match, the examined iterable + must be of the same length as the specified list of matchers. + For example: +
        assertThat(Arrays.asList("foo", "bar"), contains(Arrays.asList(equalTo("foo"), equalTo("bar"))))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by the corresponding item provided by + an examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        containsInAnyOrder

        +
        @SafeVarargs
        +public static <T> Matcher<java.lang.Iterable<? extends T>> containsInAnyOrder(Matcher<? super T>... itemMatchers)
        +

        + Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each satisfying one matcher anywhere + in the specified matchers. For a positive match, the examined iterable must be of the same + length as the number of specified matchers. +

        +

        + N.B. each of the specified matchers will only be used once during a given examination, so be + careful when specifying matchers that may be satisfied by more than one entry in an examined + iterable. +

        +

        + For example: +

        +
        assertThat(Arrays.asList("foo", "bar"), containsInAnyOrder(equalTo("bar"), equalTo("foo")))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        containsInAnyOrder

        +
        @SafeVarargs
        +public static <T> Matcher<java.lang.Iterable<? extends T>> containsInAnyOrder(T... items)
        +

        + Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each logically equal to one item + anywhere in the specified items. For a positive match, the examined iterable + must be of the same length as the number of specified items. +

        +

        + N.B. each of the specified items will only be used once during a given examination, so be + careful when specifying items that may be equal to more than one entry in an examined + iterable. +

        +

        + For example: +

        +
        assertThat(Arrays.asList("foo", "bar"), containsInAnyOrder("bar", "foo"))
        +
        +
        Parameters:
        +
        items - the items that must equal the items provided by an examined Iterable in any order
        +
        +
      • +
      + + + +
        +
      • +

        containsInAnyOrder

        +
        public static <T> Matcher<java.lang.Iterable<? extends T>> containsInAnyOrder(java.util.Collection<Matcher<? super T>> itemMatchers)
        +

        + Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each satisfying one matcher anywhere + in the specified collection of matchers. For a positive match, the examined iterable + must be of the same length as the specified collection of matchers. +

        +

        + N.B. each matcher in the specified collection will only be used once during a given + examination, so be careful when specifying matchers that may be satisfied by more than + one entry in an examined iterable. +

        +

        For example:

        +
        assertThat(Arrays.asList("foo", "bar"), containsInAnyOrder(Arrays.asList(equalTo("bar"), equalTo("foo"))))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        containsInRelativeOrder

        +
        @SafeVarargs
        +public static <E> Matcher<java.lang.Iterable<? extends E>> containsInRelativeOrder(E... items)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that contains items logically equal to the + corresponding item in the specified items, in the same relative order + For example: +
        assertThat(Arrays.asList("a", "b", "c", "d", "e"), containsInRelativeOrder("b", "d"))
        +
        +
        Parameters:
        +
        items - the items that must be contained within items provided by an examined Iterable in the same relative order
        +
        +
      • +
      + + + +
        +
      • +

        containsInRelativeOrder

        +
        @SafeVarargs
        +public static <E> Matcher<java.lang.Iterable<? extends E>> containsInRelativeOrder(Matcher<? super E>... itemMatchers)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that each satisfying the corresponding + matcher in the specified matchers, in the same relative order. + For example: +
        assertThat(Arrays.asList("a", "b", "c", "d", "e"), containsInRelativeOrder(equalTo("b"), equalTo("d")))
        +
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items provided by an examined Iterable in the same relative order
        +
        +
      • +
      + + + +
        +
      • +

        containsInRelativeOrder

        +
        public static <E> Matcher<java.lang.Iterable<? extends E>> containsInRelativeOrder(java.util.List<Matcher<? super E>> itemMatchers)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that contains items satisfying the corresponding + matcher in the specified list of matchers, in the same relative order. + For example: +
        assertThat(Arrays.asList("a", "b", "c", "d", "e"), contains(Arrays.asList(equalTo("b"), equalTo("d"))))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by the items provided by + an examined Iterable in the same relative order
        +
        +
      • +
      + + + +
        +
      • +

        iterableWithSize

        +
        public static <E> Matcher<java.lang.Iterable<E>> iterableWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields an item count that satisfies the specified + matcher. + For example: +
        assertThat(Arrays.asList("foo", "bar"), iterableWithSize(equalTo(2)))
        +
        +
        Parameters:
        +
        sizeMatcher - a matcher for the number of items that should be yielded by an examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        iterableWithSize

        +
        public static <E> Matcher<java.lang.Iterable<E>> iterableWithSize(int size)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields an item count that is equal to the specified + size argument. + For example: +
        assertThat(Arrays.asList("foo", "bar"), iterableWithSize(2))
        +
        +
        Parameters:
        +
        size - the number of items that should be yielded by an examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        hasEntry

        +
        public static <K,V> Matcher<java.util.Map<? extends K,? extends V>> hasEntry(Matcher<? super K> keyMatcher,
        +                                                                             Matcher<? super V> valueMatcher)
        +
        Creates a matcher for Maps matching when the examined Map contains + at least one entry whose key satisfies the specified keyMatcher and whose + value satisfies the specified valueMatcher. + For example: +
        assertThat(myMap, hasEntry(equalTo("bar"), equalTo("foo")))
        +
        +
        Parameters:
        +
        keyMatcher - the key matcher that, in combination with the valueMatcher, must be satisfied by at least one entry
        +
        valueMatcher - the value matcher that, in combination with the keyMatcher, must be satisfied by at least one entry
        +
        +
      • +
      + + + + + +
        +
      • +

        hasEntry

        +
        public static <K,V> Matcher<java.util.Map<? extends K,? extends V>> hasEntry(K key,
        +                                                                             V value)
        +
        Creates a matcher for Maps matching when the examined Map contains + at least one entry whose key equals the specified key and whose value equals the + specified value. + For example: +
        assertThat(myMap, hasEntry("bar", "foo"))
        +
        +
        Parameters:
        +
        key - the key that, in combination with the value, must be describe at least one entry
        +
        value - the value that, in combination with the key, must be describe at least one entry
        +
        +
      • +
      + + + +
        +
      • +

        hasKey

        +
        public static <K> Matcher<java.util.Map<? extends K,?>> hasKey(Matcher<? super K> keyMatcher)
        +
        Creates a matcher for Maps matching when the examined Map contains + at least one key that satisfies the specified matcher. + For example: +
        assertThat(myMap, hasKey(equalTo("bar")))
        +
        +
        Parameters:
        +
        keyMatcher - the matcher that must be satisfied by at least one key
        +
        +
      • +
      + + + + + +
        +
      • +

        hasKey

        +
        public static <K> Matcher<java.util.Map<? extends K,?>> hasKey(K key)
        +
        Creates a matcher for Maps matching when the examined Map contains + at least one key that is equal to the specified key. + For example: +
        assertThat(myMap, hasKey("bar"))
        +
        +
        Parameters:
        +
        key - the key that satisfying maps must contain
        +
        +
      • +
      + + + +
        +
      • +

        hasValue

        +
        public static <V> Matcher<java.util.Map<?,? extends V>> hasValue(Matcher<? super V> valueMatcher)
        +
        Creates a matcher for Maps matching when the examined Map contains + at least one value that satisfies the specified valueMatcher. + For example: +
        assertThat(myMap, hasValue(equalTo("foo")))
        +
        +
        Parameters:
        +
        valueMatcher - the matcher that must be satisfied by at least one value
        +
        +
      • +
      + + + + + +
        +
      • +

        hasValue

        +
        public static <V> Matcher<java.util.Map<?,? extends V>> hasValue(V value)
        +
        Creates a matcher for Maps matching when the examined Map contains + at least one value that is equal to the specified value. + For example: +
        assertThat(myMap, hasValue("foo"))
        +
        +
        Parameters:
        +
        value - the value that satisfying maps must contain
        +
        +
      • +
      + + + +
        +
      • +

        in

        +
        public static <T> Matcher<T> in(java.util.Collection<T> collection)
        +
        Creates a matcher that matches when the examined object is found within the + specified collection. + For example: +
        assertThat("foo", is(in(Arrays.asList("bar", "foo"))))
        +
        +
        Parameters:
        +
        collection - the collection in which matching items must be found
        +
        +
      • +
      + + + + + +
        +
      • +

        in

        +
        public static <T> Matcher<T> in(T[] elements)
        +
        Creates a matcher that matches when the examined object is found within the + specified array. + For example: +
        assertThat("foo", is(in(new String[]{"bar", "foo"})))
        +
        +
        Parameters:
        +
        elements - the array in which matching items must be found
        +
        +
      • +
      + + + +
        +
      • +

        isIn

        +
        public static <T> Matcher<T> isIn(java.util.Collection<T> collection)
        +
        Deprecated. use is(in(...)) instead
        +
        Creates a matcher that matches when the examined object is found within the + specified collection. + For example: +
        assertThat("foo", isIn(Arrays.asList("bar", "foo")))
        +
        +
        Parameters:
        +
        collection - the collection in which matching items must be found
        +
        +
      • +
      + + + + + +
        +
      • +

        isIn

        +
        public static <T> Matcher<T> isIn(T[] elements)
        +
        Deprecated. use is(in(...)) instead
        +
        Creates a matcher that matches when the examined object is found within the + specified array. + For example: +
        assertThat("foo", isIn(new String[]{"bar", "foo"}))
        +
        +
        Parameters:
        +
        elements - the array in which matching items must be found
        +
        +
      • +
      + + + + + +
        +
      • +

        isOneOf

        +
        @SafeVarargs
        +public static <T> Matcher<T> isOneOf(T... elements)
        +
        Deprecated. use is(oneOf(...)) instead
        +
        Creates a matcher that matches when the examined object is equal to one of the + specified elements. + For example: +
        assertThat("foo", isOneOf("bar", "foo"))
        +
        +
        Parameters:
        +
        elements - the elements amongst which matching items will be found
        +
        +
      • +
      + + + + + +
        +
      • +

        oneOf

        +
        @SafeVarargs
        +public static <T> Matcher<T> oneOf(T... elements)
        +
        Creates a matcher that matches when the examined object is equal to one of the + specified elements. + For example: +
        assertThat("foo", is(oneOf("bar", "foo")))
        +
        +
        Parameters:
        +
        elements - the elements amongst which matching items will be found
        +
        +
      • +
      + + + +
        +
      • +

        closeTo

        +
        public static Matcher<java.lang.Double> closeTo(double operand,
        +                                                double error)
        +
        Creates a matcher of Doubles that matches when an examined double is equal + to the specified operand, within a range of +/- error. + For example: +
        assertThat(1.03, is(closeTo(1.0, 0.03)))
        +
        +
        Parameters:
        +
        operand - the expected value of matching doubles
        +
        error - the delta (+/-) within which matches will be allowed
        +
        +
      • +
      + + + +
        +
      • +

        notANumber

        +
        public static Matcher<java.lang.Double> notANumber()
        +
        Creates a matcher of Doubles that matches when an examined double is not a number. + For example: +
        assertThat(Double.NaN, is(notANumber()))
        +
      • +
      + + + +
        +
      • +

        closeTo

        +
        public static Matcher<java.math.BigDecimal> closeTo(java.math.BigDecimal operand,
        +                                                    java.math.BigDecimal error)
        +
        Creates a matcher of BigDecimals that matches when an examined BigDecimal is equal + to the specified operand, within a range of +/- error. The comparison for equality + is done by BigDecimals BigDecimal.compareTo(java.math.BigDecimal) method. + For example: +
        assertThat(new BigDecimal("1.03"), is(closeTo(new BigDecimal("1.0"), new BigDecimal("0.03"))))
        +
        +
        Parameters:
        +
        operand - the expected value of matching BigDecimals
        +
        error - the delta (+/-) within which matches will be allowed
        +
        +
      • +
      + + + + + +
        +
      • +

        comparesEqualTo

        +
        public static <T extends java.lang.Comparable<T>> Matcher<T> comparesEqualTo(T value)
        +
        Creates a matcher of Comparable object that matches when the examined object is + equal to the specified value, as reported by the compareTo method of the + examined object. + For example: +
        assertThat(1, comparesEqualTo(1))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return zero
        +
        +
      • +
      + + + + + +
        +
      • +

        greaterThan

        +
        public static <T extends java.lang.Comparable<T>> Matcher<T> greaterThan(T value)
        +
        Creates a matcher of Comparable object that matches when the examined object is + greater than the specified value, as reported by the compareTo method of the + examined object. + For example: +
        assertThat(2, greaterThan(1))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return greater + than zero
        +
        +
      • +
      + + + + + +
        +
      • +

        greaterThanOrEqualTo

        +
        public static <T extends java.lang.Comparable<T>> Matcher<T> greaterThanOrEqualTo(T value)
        +
        Creates a matcher of Comparable object that matches when the examined object is + greater than or equal to the specified value, as reported by the compareTo method + of the examined object. + For example: +
        assertThat(1, greaterThanOrEqualTo(1))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return greater + than or equal to zero
        +
        +
      • +
      + + + + + +
        +
      • +

        lessThan

        +
        public static <T extends java.lang.Comparable<T>> Matcher<T> lessThan(T value)
        +
        Creates a matcher of Comparable object that matches when the examined object is + less than the specified value, as reported by the compareTo method of the + examined object. + For example: +
        assertThat(1, lessThan(2))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return less + than zero
        +
        +
      • +
      + + + + + +
        +
      • +

        lessThanOrEqualTo

        +
        public static <T extends java.lang.Comparable<T>> Matcher<T> lessThanOrEqualTo(T value)
        +
        Creates a matcher of Comparable object that matches when the examined object is + less than or equal to the specified value, as reported by the compareTo method + of the examined object. + For example: +
        assertThat(1, lessThanOrEqualTo(1))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return less + than or equal to zero
        +
        +
      • +
      + + + +
        +
      • +

        equalToIgnoringCase

        +
        public static Matcher<java.lang.String> equalToIgnoringCase(java.lang.String expectedString)
        +
        Creates a matcher of String that matches when the examined string is equal to + the specified expectedString, ignoring case. + For example: +
        assertThat("Foo", equalToIgnoringCase("FOO"))
        +
        +
        Parameters:
        +
        expectedString - the expected value of matched strings
        +
        +
      • +
      + + + +
        +
      • +

        equalToIgnoringWhiteSpace

        +
        public static Matcher<java.lang.String> equalToIgnoringWhiteSpace(java.lang.String expectedString)
        + +
        +
        Parameters:
        +
        expectedString - the expected value of matched strings
        +
        +
      • +
      + + + +
        +
      • +

        equalToCompressingWhiteSpace

        +
        public static Matcher<java.lang.String> equalToCompressingWhiteSpace(java.lang.String expectedString)
        +
        Creates a matcher of String that matches when the examined string is equal to + the specified expectedString, when whitespace differences are (mostly) ignored. To be + exact, the following whitespace rules are applied: +
          +
        • all leading and trailing whitespace of both the expectedString and the examined string are ignored
        • +
        • any remaining whitespace, appearing within either string, is collapsed to a single space before comparison
        • +
        + For example: +
        assertThat("   my\tfoo  bar ", equalToIgnoringWhiteSpace(" my  foo bar"))
        +
        +
        Parameters:
        +
        expectedString - the expected value of matched strings
        +
        +
      • +
      + + + +
        +
      • +

        emptyOrNullString

        +
        public static Matcher<java.lang.String> emptyOrNullString()
        +
        Creates a matcher of String that matches when the examined string is null, or + has zero length. + For example: +
        assertThat(((String)null), is(emptyOrNullString()))
        +
      • +
      + + + +
        +
      • +

        emptyString

        +
        public static Matcher<java.lang.String> emptyString()
        +
        Creates a matcher of String that matches when the examined string has zero length. + For example: +
        assertThat("", is(emptyString()))
        +
      • +
      + + + +
        +
      • +

        isEmptyOrNullString

        +
        public static Matcher<java.lang.String> isEmptyOrNullString()
        +
        Deprecated. use is(emptyOrNullString()) instead
        +
        Creates a matcher of String that matches when the examined string is null, or + has zero length. + For example: +
        assertThat(((String)null), isEmptyOrNullString())
        +
      • +
      + + + +
        +
      • +

        isEmptyString

        +
        public static Matcher<java.lang.String> isEmptyString()
        +
        Deprecated. use is(emptyString()) instead
        +
        Creates a matcher of String that matches when the examined string has zero length. + For example: +
        assertThat("", isEmptyString())
        +
      • +
      + + + +
        +
      • +

        blankOrNullString

        +
        public static Matcher<java.lang.String> blankOrNullString()
        +
        Creates a matcher of String that matches when the examined string is null, or + contains zero or more whitespace characters and nothing else. + For example: +
        assertThat(((String)null), is(blankOrNullString()))
        +
      • +
      + + + +
        +
      • +

        blankString

        +
        public static Matcher<java.lang.String> blankString()
        +
        Creates a matcher of String that matches when the examined string contains + zero or more whitespace characters and nothing else. + For example: +
        assertThat("  ", is(blankString()))
        +
      • +
      + + + +
        +
      • +

        matchesPattern

        +
        public static Matcher<java.lang.String> matchesPattern(java.util.regex.Pattern pattern)
        +
        Creates a matcher of String that matches when the examined string + exactly matches the given Pattern.
        +
      • +
      + + + +
        +
      • +

        matchesPattern

        +
        public static Matcher<java.lang.String> matchesPattern(java.lang.String regex)
        +
        Creates a matcher of String that matches when the examined string + exactly matches the given regular expression, treated as a Pattern.
        +
      • +
      + + + +
        +
      • +

        stringContainsInOrder

        +
        public static Matcher<java.lang.String> stringContainsInOrder(java.lang.Iterable<java.lang.String> substrings)
        +
        Creates a matcher of String that matches when the examined string contains all of + the specified substrings, considering the order of their appearance. + For example: +
        assertThat("myfoobarbaz", stringContainsInOrder(Arrays.asList("bar", "foo")))
        + fails as "foo" occurs before "bar" in the string "myfoobarbaz"
        +
        +
        Parameters:
        +
        substrings - the substrings that must be contained within matching strings
        +
        +
      • +
      + + + +
        +
      • +

        stringContainsInOrder

        +
        public static Matcher<java.lang.String> stringContainsInOrder(java.lang.String... substrings)
        +
        Creates a matcher of String that matches when the examined string contains all of + the specified substrings, considering the order of their appearance. + For example: +
        assertThat("myfoobarbaz", stringContainsInOrder("bar", "foo"))
        + fails as "foo" occurs before "bar" in the string "myfoobarbaz"
        +
        +
        Parameters:
        +
        substrings - the substrings that must be contained within matching strings
        +
        +
      • +
      + + + +
        +
      • +

        hasLength

        +
        public static Matcher<java.lang.CharSequence> hasLength(int length)
        +
        Creates a matcher of CharSequence that matches when a char sequence has the length + of the specified argument. + For example: + +
        + assertThat("text", length(4))
        + 
        +
        +
        Parameters:
        +
        length - the expected length of the string
        +
        +
      • +
      + + + +
        +
      • +

        hasToString

        +
        public static <T> Matcher<T> hasToString(Matcher<? super java.lang.String> toStringMatcher)
        +
        Creates a matcher that matches any examined object whose toString method + returns a value that satisfies the specified matcher. + For example: +
        assertThat(true, hasToString(equalTo("TRUE")))
        +
        +
        Parameters:
        +
        toStringMatcher - the matcher used to verify the toString result
        +
        +
      • +
      + + + +
        +
      • +

        hasToString

        +
        public static <T> Matcher<T> hasToString(java.lang.String expectedToString)
        +
        Creates a matcher that matches any examined object whose toString method + returns a value equalTo the specified string. + For example: +
        assertThat(true, hasToString("TRUE"))
        +
        +
        Parameters:
        +
        expectedToString - the expected toString result
        +
        +
      • +
      + + + +
        +
      • +

        typeCompatibleWith

        +
        public static <T> Matcher<java.lang.Class<?>> typeCompatibleWith(java.lang.Class<T> baseType)
        +
        Creates a matcher of Class that matches when the specified baseType is + assignable from the examined class. + For example: +
        assertThat(Integer.class, typeCompatibleWith(Number.class))
        +
        +
        Parameters:
        +
        baseType - the base class to examine classes against
        +
        +
      • +
      + + + +
        +
      • +

        eventFrom

        +
        public static Matcher<java.util.EventObject> eventFrom(java.lang.Class<? extends java.util.EventObject> eventClass,
        +                                                       java.lang.Object source)
        +
        Creates a matcher of EventObject that matches any object + derived from eventClass announced by source. + For example: +
        assertThat(myEvent, is(eventFrom(PropertyChangeEvent.class, myBean)))
        +
        +
        Parameters:
        +
        eventClass - the class of the event to match on
        +
        source - the source of the event
        +
        +
      • +
      + + + +
        +
      • +

        eventFrom

        +
        public static Matcher<java.util.EventObject> eventFrom(java.lang.Object source)
        +
        Creates a matcher of EventObject that matches any EventObject + announced by source. + For example: +
        assertThat(myEvent, is(eventFrom(myBean)))
        +
        +
        Parameters:
        +
        source - the source of the event
        +
        +
      • +
      + + + +
        +
      • +

        hasProperty

        +
        public static <T> Matcher<T> hasProperty(java.lang.String propertyName)
        +
        Creates a matcher that matches when the examined object has a JavaBean property + with the specified name. + For example: +
        assertThat(myBean, hasProperty("foo"))
        +
        +
        Parameters:
        +
        propertyName - the name of the JavaBean property that examined beans should possess
        +
        +
      • +
      + + + +
        +
      • +

        hasProperty

        +
        public static <T> Matcher<T> hasProperty(java.lang.String propertyName,
        +                                         Matcher<?> valueMatcher)
        +
        Creates a matcher that matches when the examined object has a JavaBean property + with the specified name whose value satisfies the specified matcher. + For example: +
        assertThat(myBean, hasProperty("foo", equalTo("bar"))
        +
        +
        Parameters:
        +
        propertyName - the name of the JavaBean property that examined beans should possess
        +
        valueMatcher - a matcher for the value of the specified property of the examined bean
        +
        +
      • +
      + + + + + +
        +
      • +

        samePropertyValuesAs

        +
        public static <B> Matcher<B> samePropertyValuesAs(B expectedBean,
        +                                                  java.lang.String... ignoredProperties)
        +
        Creates a matcher that matches when the examined object has values for all of + its JavaBean properties that are equal to the corresponding values of the + specified bean. If any properties are marked as ignored, they will be dropped from + both the expected and actual bean. Note that the ignored properties use JavaBean + display names, for example
        age
        rather than method names such as
        getAge
        . + For example: +
        assertThat(myBean, samePropertyValuesAs(myExpectedBean))
        +
        assertThat(myBean, samePropertyValuesAs(myExpectedBean), "age", "height")
        +
        +
        Parameters:
        +
        expectedBean - the bean against which examined beans are compared
        +
        ignoredProperties - do not check any of these named properties.
        +
        +
      • +
      + + + +
        +
      • +

        hasXPath

        +
        public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath,
        +                                                 Matcher<java.lang.String> valueMatcher)
        +
        Creates a matcher of Nodes that matches when the examined node has a value at the + specified xPath that satisfies the specified valueMatcher. + For example: +
        assertThat(xml, hasXPath("/root/something[2]/cheese", equalTo("Cheddar")))
        +
        +
        Parameters:
        +
        xPath - the target xpath
        +
        valueMatcher - matcher for the value at the specified xpath
        +
        +
      • +
      + + + +
        +
      • +

        hasXPath

        +
        public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath,
        +                                                 javax.xml.namespace.NamespaceContext namespaceContext,
        +                                                 Matcher<java.lang.String> valueMatcher)
        +
        Creates a matcher of Nodes that matches when the examined node has a value at the + specified xPath, within the specified namespaceContext, that satisfies + the specified valueMatcher. + For example: +
        assertThat(xml, hasXPath("/root/something[2]/cheese", myNs, equalTo("Cheddar")))
        +
        +
        Parameters:
        +
        xPath - the target xpath
        +
        namespaceContext - the namespace for matching nodes
        +
        valueMatcher - matcher for the value at the specified xpath
        +
        +
      • +
      + + + +
        +
      • +

        hasXPath

        +
        public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath)
        +
        Creates a matcher of Nodes that matches when the examined node contains a node + at the specified xPath, with any content. + For example: +
        assertThat(xml, hasXPath("/root/something[2]/cheese"))
        +
        +
        Parameters:
        +
        xPath - the target xpath
        +
        +
      • +
      + + + +
        +
      • +

        hasXPath

        +
        public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath,
        +                                                 javax.xml.namespace.NamespaceContext namespaceContext)
        +
        Creates a matcher of Nodes that matches when the examined node contains a node + at the specified xPath within the specified namespace context, with any content. + For example: +
        assertThat(xml, hasXPath("/root/something[2]/cheese", myNs))
        +
        +
        Parameters:
        +
        xPath - the target xpath
        +
        namespaceContext - the namespace for matching nodes
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/SelfDescribing.html b/docs/javadoc/2.1/org/hamcrest/SelfDescribing.html new file mode 100644 index 00000000..8af333cd --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/SelfDescribing.html @@ -0,0 +1,237 @@ + + + + + +SelfDescribing (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Interface SelfDescribing

+
+
+ +
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        describeTo

        +
        void describeTo(Description description)
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/StringDescription.html b/docs/javadoc/2.1/org/hamcrest/StringDescription.html new file mode 100644 index 00000000..4f7859f0 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/StringDescription.html @@ -0,0 +1,417 @@ + + + + + +StringDescription (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class StringDescription

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StringDescription

        +
        public StringDescription()
        +
      • +
      + + + +
        +
      • +

        StringDescription

        +
        public StringDescription(java.lang.Appendable out)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        toString

        +
        public static java.lang.String toString(SelfDescribing selfDescribing)
        +
        Return the description of a SelfDescribing object as a String.
        +
        +
        Parameters:
        +
        selfDescribing - The object to be described.
        +
        Returns:
        +
        The description of the object.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        append

        +
        protected void append(java.lang.String str)
        +
        Description copied from class: BaseDescription
        +
        Append the String str to the description. + The default implementation passes every character to BaseDescription.append(char). + Override in subclasses to provide an efficient implementation.
        +
        +
        Overrides:
        +
        append in class BaseDescription
        +
        +
      • +
      + + + +
        +
      • +

        append

        +
        protected void append(char c)
        +
        Description copied from class: BaseDescription
        +
        Append the char c to the description.
        +
        +
        Specified by:
        +
        append in class BaseDescription
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        Returns the description as a string.
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/TypeSafeDiagnosingMatcher.html b/docs/javadoc/2.1/org/hamcrest/TypeSafeDiagnosingMatcher.html new file mode 100644 index 00000000..2a0c4bd6 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/TypeSafeDiagnosingMatcher.html @@ -0,0 +1,423 @@ + + + + + +TypeSafeDiagnosingMatcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class TypeSafeDiagnosingMatcher<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TypeSafeDiagnosingMatcher

        +
        protected TypeSafeDiagnosingMatcher(java.lang.Class<?> expectedType)
        +
        Use this constructor if the subclass that implements matchesSafely + is not the class that binds <T> to a type.
        +
        +
        Parameters:
        +
        expectedType - The expectedType of the actual value.
        +
        +
      • +
      + + + +
        +
      • +

        TypeSafeDiagnosingMatcher

        +
        protected TypeSafeDiagnosingMatcher(ReflectiveTypeFinder typeFinder)
        +
        Use this constructor if the subclass that implements matchesSafely + is not the class that binds <T> to a type.
        +
        +
        Parameters:
        +
        typeFinder - A type finder to extract the type
        +
        +
      • +
      + + + +
        +
      • +

        TypeSafeDiagnosingMatcher

        +
        protected TypeSafeDiagnosingMatcher()
        +
        The default constructor for simple sub types
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        matchesSafely

        +
        protected abstract boolean matchesSafely(T item,
        +                                         Description mismatchDescription)
        +
        Subclasses should implement this. The item will already have been checked + for the specific type and will never be null.
        +
      • +
      + + + +
        +
      • +

        matches

        +
        public final boolean matches(java.lang.Object item)
        +
        Description copied from interface: Matcher
        +
        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:
        +
        item - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatch

        +
        public final void describeMismatch(java.lang.Object item,
        +                                   Description mismatchDescription)
        +
        Description copied from interface: Matcher
        +
        Generate a description of why the matcher has not accepted the item. + The description will be part of a larger description of why a matching + failed, so it should be concise. + This method assumes that matches(item) is false, but + will not check this.
        +
        +
        Specified by:
        +
        describeMismatch in interface Matcher<T>
        +
        Overrides:
        +
        describeMismatch in class BaseMatcher<T>
        +
        Parameters:
        +
        item - The item that the Matcher has rejected.
        +
        mismatchDescription - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/TypeSafeMatcher.html b/docs/javadoc/2.1/org/hamcrest/TypeSafeMatcher.html new file mode 100644 index 00000000..c706dbb2 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/TypeSafeMatcher.html @@ -0,0 +1,432 @@ + + + + + +TypeSafeMatcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest
+

Class TypeSafeMatcher<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TypeSafeMatcher

        +
        protected TypeSafeMatcher()
        +
        The default constructor for simple sub types
        +
      • +
      + + + +
        +
      • +

        TypeSafeMatcher

        +
        protected TypeSafeMatcher(java.lang.Class<?> expectedType)
        +
        Use this constructor if the subclass that implements matchesSafely + is not the class that binds <T> to a type.
        +
        +
        Parameters:
        +
        expectedType - The expectedType of the actual value.
        +
        +
      • +
      + + + +
        +
      • +

        TypeSafeMatcher

        +
        protected TypeSafeMatcher(ReflectiveTypeFinder typeFinder)
        +
        Use this constructor if the subclass that implements matchesSafely + is not the class that binds <T> to a type.
        +
        +
        Parameters:
        +
        typeFinder - A type finder to extract the type
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        matchesSafely

        +
        protected abstract boolean matchesSafely(T item)
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
      • +
      + + + + + +
        +
      • +

        describeMismatchSafely

        +
        protected void describeMismatchSafely(T item,
        +                                      Description mismatchDescription)
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
      • +
      + + + +
        +
      • +

        matches

        +
        public final boolean matches(java.lang.Object item)
        +
        Methods made final to prevent accidental override. + If you need to override this, there's no point on extending TypeSafeMatcher. + Instead, extend the BaseMatcher.
        +
        +
        Parameters:
        +
        item - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatch

        +
        public final void describeMismatch(java.lang.Object item,
        +                                   Description description)
        +
        Description copied from interface: Matcher
        +
        Generate a description of why the matcher has not accepted the item. + The description will be part of a larger description of why a matching + failed, so it should be concise. + This method assumes that matches(item) is false, but + will not check this.
        +
        +
        Specified by:
        +
        describeMismatch in interface Matcher<T>
        +
        Overrides:
        +
        describeMismatch in class BaseMatcher<T>
        +
        Parameters:
        +
        item - The item that the Matcher has rejected.
        +
        description - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/beans/HasProperty.html b/docs/javadoc/2.1/org/hamcrest/beans/HasProperty.html new file mode 100644 index 00000000..4d9183b5 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/beans/HasProperty.html @@ -0,0 +1,384 @@ + + + + + +HasProperty (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.beans
+

Class HasProperty<T>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public class HasProperty<T>
    +extends TypeSafeMatcher<T>
    +
    A Matcher that checks that an object has a JavaBean property + with the specified name. If an error occurs during introspection + of the object then this is treated as a mismatch.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        HasProperty

        +
        public HasProperty(java.lang.String propertyName)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(T obj)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<T>
        +
        +
      • +
      + + + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(T item,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<T>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        hasProperty

        +
        public static <T> Matcher<T> hasProperty(java.lang.String propertyName)
        +
        Creates a matcher that matches when the examined object has a JavaBean property + with the specified name. + For example: +
        assertThat(myBean, hasProperty("foo"))
        +
        +
        Parameters:
        +
        propertyName - the name of the JavaBean property that examined beans should possess
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/beans/HasPropertyWithValue.html b/docs/javadoc/2.1/org/hamcrest/beans/HasPropertyWithValue.html new file mode 100644 index 00000000..49edb6b5 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/beans/HasPropertyWithValue.html @@ -0,0 +1,455 @@ + + + + + +HasPropertyWithValue (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.beans
+

Class HasPropertyWithValue<T>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public class HasPropertyWithValue<T>
    +extends TypeSafeDiagnosingMatcher<T>
    +

    Matcher that asserts that a JavaBean property on an argument passed to the + mock object meets the provided matcher. This is useful for when objects + are created within code under test and passed to a mock object, and you wish + to assert that the created object has certain properties. +

    + +

    Example Usage

    + Consider the situation where we have a class representing a person, which + follows the basic JavaBean convention of having get() and possibly set() + methods for it's properties: +
    + public class Person {
    +   private String name;
    +   public Person(String person) {
    +     this.person = person;
    +   }
    +   public String getName() {
    +     return name;
    +   }
    + }
    + + And that these person objects are generated within a piece of code under test + (a class named PersonGenerator). This object is sent to one of our mock objects + which overrides the PersonGenerationListener interface: +
    + public interface PersonGenerationListener {
    +   public void personGenerated(Person person);
    + }
    + + In order to check that the code under test generates a person with name + "Iain" we would do the following: +
    + Mock personGenListenerMock = mock(PersonGenerationListener.class);
    + personGenListenerMock.expects(once()).method("personGenerated").with(and(isA(Person.class), hasProperty("Name", eq("Iain")));
    + PersonGenerationListener listener = (PersonGenerationListener)personGenListenerMock.proxy();
    + +

    If an exception is thrown by the getter method for a property, the property + does not exist, is not readable, or a reflection related exception is thrown + when trying to invoke it then this is treated as an evaluation failure and + the matches method will return false. +

    +

    This matcher class will also work with JavaBean objects that have explicit + bean descriptions via an associated BeanInfo description class. See the + JavaBeans specification for more information: + http://java.sun.com/products/javabeans/docs/index.html +

    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        HasPropertyWithValue

        +
        public HasPropertyWithValue(java.lang.String propertyName,
        +                            Matcher<?> valueMatcher)
        +
      • +
      + + + +
        +
      • +

        HasPropertyWithValue

        +
        public HasPropertyWithValue(java.lang.String propertyName,
        +                            Matcher<?> valueMatcher,
        +                            java.lang.String messageFormat)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        hasProperty

        +
        public static <T> Matcher<T> hasProperty(java.lang.String propertyName,
        +                                         Matcher<?> valueMatcher)
        +
        Creates a matcher that matches when the examined object has a JavaBean property + with the specified name whose value satisfies the specified matcher. + For example: +
        assertThat(myBean, hasProperty("foo", equalTo("bar"))
        +
        +
        Parameters:
        +
        propertyName - the name of the JavaBean property that examined beans should possess
        +
        valueMatcher - a matcher for the value of the specified property of the examined bean
        +
        +
      • +
      + + + +
        +
      • +

        hasPropertyAtPath

        +
        public static <T> Matcher<T> hasPropertyAtPath(java.lang.String path,
        +                                               Matcher<T> valueMatcher)
        +
        Creates a matcher that matches when the examined object is a graph of + JavaBean objects that can be navigated along the declared dot-separated path + and the final element of that path is a JavaBean property whose value satisfies the + specified matcher. + For example: +
        assertThat(myBean, hasProperty("foo.bar.baz", equalTo("a property value"))
        +
        +
        Parameters:
        +
        path - the dot-separated path from the examined object to the JavaBean property
        +
        valueMatcher - a matcher for the value of the specified property of the examined bean
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/beans/PropertyUtil.html b/docs/javadoc/2.1/org/hamcrest/beans/PropertyUtil.html new file mode 100644 index 00000000..48dd62c1 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/beans/PropertyUtil.html @@ -0,0 +1,354 @@ + + + + + +PropertyUtil (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.beans
+

Class PropertyUtil

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.beans.PropertyUtil
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class PropertyUtil
    +extends java.lang.Object
    +
    Utility class for accessing properties on JavaBean objects. + See http://java.sun.com/products/javabeans/docs/index.html for + more information on JavaBeans.
    +
    +
    Since:
    +
    1.1.0
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      static java.lang.Object[]NO_ARGUMENTS 
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      PropertyUtil() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static java.beans.PropertyDescriptorgetPropertyDescriptor(java.lang.String propertyName, + java.lang.Object fromObj) +
      Returns the description of the property with the provided + name on the provided object's interface.
      +
      static java.beans.PropertyDescriptor[]propertyDescriptorsFor(java.lang.Object fromObj, + java.lang.Class<java.lang.Object> stopClass) +
      Returns all the property descriptors for the class associated with the given object
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        NO_ARGUMENTS

        +
        public static final java.lang.Object[] NO_ARGUMENTS
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PropertyUtil

        +
        public PropertyUtil()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getPropertyDescriptor

        +
        public static java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.String propertyName,
        +                                                                  java.lang.Object fromObj)
        +                                                           throws java.lang.IllegalArgumentException
        +
        Returns the description of the property with the provided + name on the provided object's interface.
        +
        +
        Returns:
        +
        the descriptor of the property, or null if the property does not exist.
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if there's a introspection failure
        +
        +
      • +
      + + + +
        +
      • +

        propertyDescriptorsFor

        +
        public static java.beans.PropertyDescriptor[] propertyDescriptorsFor(java.lang.Object fromObj,
        +                                                                     java.lang.Class<java.lang.Object> stopClass)
        +                                                              throws java.lang.IllegalArgumentException
        +
        Returns all the property descriptors for the class associated with the given object
        +
        +
        Parameters:
        +
        fromObj - Use the class of this object
        +
        stopClass - Don't include any properties from this ancestor class upwards.
        +
        Returns:
        +
        Property descriptors
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if there's a introspection failure
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/beans/SamePropertyValuesAs.html b/docs/javadoc/2.1/org/hamcrest/beans/SamePropertyValuesAs.html new file mode 100644 index 00000000..18887364 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/beans/SamePropertyValuesAs.html @@ -0,0 +1,364 @@ + + + + + +SamePropertyValuesAs (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.beans
+

Class SamePropertyValuesAs<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + + + +
        +
      • +

        SamePropertyValuesAs

        +
        public SamePropertyValuesAs(T expectedBean,
        +                            java.util.List<java.lang.String> ignoredProperties)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + + + +
        +
      • +

        samePropertyValuesAs

        +
        public static <B> Matcher<B> samePropertyValuesAs(B expectedBean,
        +                                                  java.lang.String... ignoredProperties)
        +
        Creates a matcher that matches when the examined object has values for all of + its JavaBean properties that are equal to the corresponding values of the + specified bean. If any properties are marked as ignored, they will be dropped from + both the expected and actual bean. Note that the ignored properties use JavaBean + display names, for example
        age
        rather than method names such as
        getAge
        . + For example: +
        assertThat(myBean, samePropertyValuesAs(myExpectedBean))
        +
        assertThat(myBean, samePropertyValuesAs(myExpectedBean), "age", "height")
        +
        +
        Parameters:
        +
        expectedBean - the bean against which examined beans are compared
        +
        ignoredProperties - do not check any of these named properties.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/beans/package-frame.html b/docs/javadoc/2.1/org/hamcrest/beans/package-frame.html new file mode 100644 index 00000000..05a47fe2 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/beans/package-frame.html @@ -0,0 +1,23 @@ + + + + + +org.hamcrest.beans (Hamcrest 2.1 API) + + + + + +

org.hamcrest.beans

+ + + diff --git a/docs/javadoc/2.1/org/hamcrest/beans/package-summary.html b/docs/javadoc/2.1/org/hamcrest/beans/package-summary.html new file mode 100644 index 00000000..61addd3f --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/beans/package-summary.html @@ -0,0 +1,169 @@ + + + + + +org.hamcrest.beans (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Package org.hamcrest.beans

+
+
Matchers of Java Bean properties and their values.
+
+

See: Description

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    HasProperty<T> +
    A Matcher that checks that an object has a JavaBean property + with the specified name.
    +
    HasPropertyWithValue<T> +
    Matcher that asserts that a JavaBean property on an argument passed to the + mock object meets the provided matcher.
    +
    PropertyUtil +
    Utility class for accessing properties on JavaBean objects.
    +
    SamePropertyValuesAs<T> 
    +
  • +
+ + + +

Package org.hamcrest.beans Description

+

Matchers of Java Bean properties and their values.

+
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/beans/package-tree.html b/docs/javadoc/2.1/org/hamcrest/beans/package-tree.html new file mode 100644 index 00000000..0fd46d7f --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/beans/package-tree.html @@ -0,0 +1,154 @@ + + + + + +org.hamcrest.beans Class Hierarchy (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.beans

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/ArrayAsIterableMatcher.html b/docs/javadoc/2.1/org/hamcrest/collection/ArrayAsIterableMatcher.html new file mode 100644 index 00000000..fa643785 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/ArrayAsIterableMatcher.html @@ -0,0 +1,410 @@ + + + + + +ArrayAsIterableMatcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class ArrayAsIterableMatcher<E>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + + + + + +
        +
      • +

        matchers

        +
        protected final java.util.Collection<Matcher<? super E>> matchers
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ArrayAsIterableMatcher

        +
        public ArrayAsIterableMatcher(TypeSafeDiagnosingMatcher<java.lang.Iterable<? extends E>> iterableMatcher,
        +                              java.util.Collection<Matcher<? super E>> matchers,
        +                              java.lang.String message)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(E[] item)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<E[]>
        +
        +
      • +
      + + + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(E[] item,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<E[]>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/ArrayMatching.html b/docs/javadoc/2.1/org/hamcrest/collection/ArrayMatching.html new file mode 100644 index 00000000..d13acda7 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/ArrayMatching.html @@ -0,0 +1,510 @@ + + + + + +ArrayMatching (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class ArrayMatching

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.collection.ArrayMatching
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class ArrayMatching
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      ArrayMatching() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static <E> Matcher<E[]>arrayContaining(E... items) +
      Creates a matcher for arrays that matches when each item in the examined array is + logically equal to the corresponding item in the specified items.
      +
      static <E> Matcher<E[]>arrayContaining(java.util.List<Matcher<? super E>> itemMatchers) +
      Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified list of matchers.
      +
      static <E> Matcher<E[]>arrayContaining(Matcher<? super E>... itemMatchers) +
      Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified matchers.
      +
      static <E> Matcher<E[]>arrayContainingInAnyOrder(java.util.Collection<Matcher<? super E>> itemMatchers) +
      + Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified collection of matchers.
      +
      static <E> Matcher<E[]>arrayContainingInAnyOrder(E... items) +
      Creates an order agnostic matcher for arrays that matches when each item in the + examined array is logically equal to one item anywhere in the specified items.
      +
      static <E> Matcher<E[]>arrayContainingInAnyOrder(Matcher<? super E>... itemMatchers) +
      + Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified matchers.
      +
      static <E> java.util.List<Matcher<? super E>>asEqualMatchers(E[] items) 
      static <T> Matcher<T[]>hasItemInArray(Matcher<? super T> elementMatcher) +
      Creates a matcher for arrays that matches when the examined array contains at least one item + that is matched by the specified elementMatcher.
      +
      static <T> Matcher<T[]>hasItemInArray(T element) +
      A shortcut to the frequently used hasItemInArray(equalTo(x)).
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ArrayMatching

        +
        public ArrayMatching()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        hasItemInArray

        +
        public static <T> Matcher<T[]> hasItemInArray(Matcher<? super T> elementMatcher)
        +
        Creates a matcher for arrays that matches when the examined array contains at least one item + that is matched by the specified elementMatcher. Whilst matching, the traversal + of the examined array will stop as soon as a matching element is found. + For example: +
        assertThat(new String[] {"foo", "bar"}, hasItemInArray(startsWith("ba")))
        +
        +
        Parameters:
        +
        elementMatcher - the matcher to apply to elements in examined arrays
        +
        +
      • +
      + + + + + +
        +
      • +

        hasItemInArray

        +
        public static <T> Matcher<T[]> hasItemInArray(T element)
        +
        A shortcut to the frequently used hasItemInArray(equalTo(x)). + For example: +
        assertThat(hasItemInArray(x))
        + instead of: +
        assertThat(hasItemInArray(equalTo(x)))
        +
        +
        Parameters:
        +
        element - the element that should be present in examined arrays
        +
        +
      • +
      + + + +
        +
      • +

        arrayContainingInAnyOrder

        +
        @SafeVarargs
        +public static <E> Matcher<E[]> arrayContainingInAnyOrder(Matcher<? super E>... itemMatchers)
        +

        + Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified matchers. + For a positive match, the examined array must be of the same length as the number of + specified matchers. +

        +

        + N.B. each of the specified matchers will only be used once during a given examination, so be + careful when specifying matchers that may be satisfied by more than one entry in an examined + array. +

        +

        + For example: +

        +
        assertThat(new String[]{"foo", "bar"}, arrayContainingInAnyOrder(equalTo("bar"), equalTo("foo")))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an entry in an examined array
        +
        +
      • +
      + + + +
        +
      • +

        arrayContainingInAnyOrder

        +
        public static <E> Matcher<E[]> arrayContainingInAnyOrder(java.util.Collection<Matcher<? super E>> itemMatchers)
        +

        + Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified collection of matchers. + For a positive match, the examined array must be of the same length as the specified collection + of matchers. +

        +

        + N.B. each matcher in the specified collection will only be used once during a given + examination, so be careful when specifying matchers that may be satisfied by more than + one entry in an examined array. +

        +

        + For example: +

        +
        assertThat(new String[]{"foo", "bar"}, arrayContainingInAnyOrder(Arrays.asList(equalTo("bar"), equalTo("foo"))))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined array
        +
        +
      • +
      + + + + + +
        +
      • +

        arrayContainingInAnyOrder

        +
        @SafeVarargs
        +public static <E> Matcher<E[]> arrayContainingInAnyOrder(E... items)
        +

        Creates an order agnostic matcher for arrays that matches when each item in the + examined array is logically equal to one item anywhere in the specified items. + For a positive match, the examined array must be of the same length as the number of + specified items. +

        +

        N.B. each of the specified items will only be used once during a given examination, so be + careful when specifying items that may be equal to more than one entry in an examined + array. +

        +

        + For example: +

        +
        assertThat(new String[]{"foo", "bar"}, containsInAnyOrder("bar", "foo"))
        +
        +
        Parameters:
        +
        items - the items that must equal the entries of an examined array, in any order
        +
        +
      • +
      + + + + + +
        +
      • +

        arrayContaining

        +
        @SafeVarargs
        +public static <E> Matcher<E[]> arrayContaining(E... items)
        +
        Creates a matcher for arrays that matches when each item in the examined array is + logically equal to the corresponding item in the specified items. For a positive match, + the examined array must be of the same length as the number of specified items. + For example: +
        assertThat(new String[]{"foo", "bar"}, contains("foo", "bar"))
        +
        +
        Parameters:
        +
        items - the items that must equal the items within an examined array
        +
        +
      • +
      + + + +
        +
      • +

        arrayContaining

        +
        @SafeVarargs
        +public static <E> Matcher<E[]> arrayContaining(Matcher<? super E>... itemMatchers)
        +
        Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified matchers. For a positive match, the examined array + must be of the same length as the number of specified matchers. + For example: +
        assertThat(new String[]{"foo", "bar"}, arrayContaining(equalTo("foo"), equalTo("bar")))
        +
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items in the examined array
        +
        +
      • +
      + + + +
        +
      • +

        arrayContaining

        +
        public static <E> Matcher<E[]> arrayContaining(java.util.List<Matcher<? super E>> itemMatchers)
        +
        Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified list of matchers. For a positive match, the examined array + must be of the same length as the specified list of matchers. + For example: +
        assertThat(new String[]{"foo", "bar"}, arrayContaining(Arrays.asList(equalTo("foo"), equalTo("bar"))))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by the corresponding item in an examined array
        +
        +
      • +
      + + + + + +
        +
      • +

        asEqualMatchers

        +
        public static <E> java.util.List<Matcher<? super E>> asEqualMatchers(E[] items)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/HasItemInArray.html b/docs/javadoc/2.1/org/hamcrest/collection/HasItemInArray.html new file mode 100644 index 00000000..4a218c2d --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/HasItemInArray.html @@ -0,0 +1,358 @@ + + + + + +HasItemInArray (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class HasItemInArray<T>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<T[]>, SelfDescribing
    +
    +
    +
    +
    public class HasItemInArray<T>
    +extends TypeSafeMatcher<T[]>
    +
    Matches if an array contains an item satisfying a nested matcher.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        HasItemInArray

        +
        public HasItemInArray(Matcher<? super T> elementMatcher)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(T[] actual)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<T[]>
        +
        +
      • +
      + + + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(T[] actual,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<T[]>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsArray.html b/docs/javadoc/2.1/org/hamcrest/collection/IsArray.html new file mode 100644 index 00000000..187cd20f --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsArray.html @@ -0,0 +1,440 @@ + + + + + +IsArray (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsArray<T>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<T[]>, SelfDescribing
    +
    +
    +
    +
    public class IsArray<T>
    +extends TypeSafeMatcher<T[]>
    +
    Matcher for array whose elements satisfy a sequence of matchers. + The array size must equal the number of element matchers.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsArray

        +
        public IsArray(Matcher<? super T>[] elementMatchers)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(T[] array)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<T[]>
        +
        +
      • +
      + + + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(T[] actual,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<T[]>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        descriptionStart

        +
        protected java.lang.String descriptionStart()
        +
        Returns the string that starts the description. + + Can be overridden in subclasses to customise how the matcher is + described.
        +
      • +
      + + + +
        +
      • +

        descriptionSeparator

        +
        protected java.lang.String descriptionSeparator()
        +
        Returns the string that separates the elements in the description. + + Can be overridden in subclasses to customise how the matcher is + described.
        +
      • +
      + + + +
        +
      • +

        descriptionEnd

        +
        protected java.lang.String descriptionEnd()
        +
        Returns the string that ends the description. + + Can be overridden in subclasses to customise how the matcher is + described.
        +
      • +
      + + + +
        +
      • +

        array

        +
        public static <T> IsArray<T> array(Matcher<? super T>... elementMatchers)
        +
        Creates a matcher that matches arrays whose elements are satisfied by the specified matchers. Matches + positively only if the number of matchers specified is equal to the length of the examined array and + each matcher[i] is satisfied by array[i]. + For example: +
        assertThat(new Integer[]{1,2,3}, is(array(equalTo(1), equalTo(2), equalTo(3))))
        +
        +
        Parameters:
        +
        elementMatchers - the matchers that the elements of examined arrays should satisfy
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsArrayContainingInAnyOrder.html b/docs/javadoc/2.1/org/hamcrest/collection/IsArrayContainingInAnyOrder.html new file mode 100644 index 00000000..5aa413e6 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsArrayContainingInAnyOrder.html @@ -0,0 +1,471 @@ + + + + + +IsArrayContainingInAnyOrder (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsArrayContainingInAnyOrder<E>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsArrayContainingInAnyOrder

        +
        public IsArrayContainingInAnyOrder(java.util.Collection<Matcher<? super E>> matchers)
        +
        Deprecated. 
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(E[] item)
        +
        Deprecated. 
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<E[]>
        +
        +
      • +
      + + + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(E[] item,
        +                                   Description mismatchDescription)
        +
        Deprecated. 
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<E[]>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Deprecated. 
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        arrayContainingInAnyOrder

        +
        public static <E> Matcher<E[]> arrayContainingInAnyOrder(Matcher<? super E>... itemMatchers)
        +
        Deprecated. As of version 2.1, use ArrayMatching.arrayContainingInAnyOrder(Matcher[]).
        +
        Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified matchers. + For a positive match, the examined array must be of the same length as the number of + specified matchers. +

        + N.B. each of the specified matchers will only be used once during a given examination, so be + careful when specifying matchers that may be satisfied by more than one entry in an examined + array. +

        + For example: +

        assertThat(new String[]{"foo", "bar"}, arrayContainingInAnyOrder(equalTo("bar"), equalTo("foo")))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an entry in an examined array
        +
        +
      • +
      + + + +
        +
      • +

        arrayContainingInAnyOrder

        +
        public static <E> Matcher<E[]> arrayContainingInAnyOrder(java.util.Collection<Matcher<? super E>> itemMatchers)
        +
        Deprecated. As of version 2.1, use ArrayMatching.arrayContainingInAnyOrder(Collection).
        +
        Creates an order agnostic matcher for arrays that matches when each item in the + examined array satisfies one matcher anywhere in the specified collection of matchers. + For a positive match, the examined array must be of the same length as the specified collection + of matchers. +

        + N.B. each matcher in the specified collection will only be used once during a given + examination, so be careful when specifying matchers that may be satisfied by more than + one entry in an examined array. +

        + For example: +

        assertThat(new String[]{"foo", "bar"}, arrayContainingInAnyOrder(Arrays.asList(equalTo("bar"), equalTo("foo"))))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined array
        +
        +
      • +
      + + + + + +
        +
      • +

        arrayContainingInAnyOrder

        +
        public static <E> Matcher<E[]> arrayContainingInAnyOrder(E... items)
        +
        Deprecated. As of version 2.1, use ArrayMatching.arrayContainingInAnyOrder(Object[]).
        +
        Creates an order agnostic matcher for arrays that matches when each item in the + examined array is logically equal to one item anywhere in the specified items. + For a positive match, the examined array must be of the same length as the number of + specified items. +

        + N.B. each of the specified items will only be used once during a given examination, so be + careful when specifying items that may be equal to more than one entry in an examined + array. +

        + For example: +

        assertThat(new String[]{"foo", "bar"}, containsInAnyOrder("bar", "foo"))
        +
        +
        Parameters:
        +
        items - the items that must equal the entries of an examined array, in any order
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsArrayContainingInOrder.html b/docs/javadoc/2.1/org/hamcrest/collection/IsArrayContainingInOrder.html new file mode 100644 index 00000000..c3de3b6c --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsArrayContainingInOrder.html @@ -0,0 +1,455 @@ + + + + + +IsArrayContainingInOrder (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsArrayContainingInOrder<E>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsArrayContainingInOrder

        +
        public IsArrayContainingInOrder(java.util.List<Matcher<? super E>> matchers)
        +
        Deprecated. 
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(E[] item)
        +
        Deprecated. 
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<E[]>
        +
        +
      • +
      + + + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(E[] item,
        +                                   Description mismatchDescription)
        +
        Deprecated. 
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<E[]>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Deprecated. 
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + + + +
        +
      • +

        arrayContaining

        +
        public static <E> Matcher<E[]> arrayContaining(E... items)
        +
        Deprecated. As of version 2.1, use ArrayMatching.arrayContaining(Object[]).
        +
        Creates a matcher for arrays that matcheswhen each item in the examined array is + logically equal to the corresponding item in the specified items. For a positive match, + the examined array must be of the same length as the number of specified items. +

        + For example: +

        assertThat(new String[]{"foo", "bar"}, contains("foo", "bar"))
        +
        +
        Parameters:
        +
        items - the items that must equal the items within an examined array
        +
        +
      • +
      + + + +
        +
      • +

        arrayContaining

        +
        public static <E> Matcher<E[]> arrayContaining(Matcher<? super E>... itemMatchers)
        +
        Deprecated. As of version 2.1, use ArrayMatching.arrayContaining(Matcher[]).
        +
        Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified matchers. For a positive match, the examined array + must be of the same length as the number of specified matchers. +

        + For example: +

        assertThat(new String[]{"foo", "bar"}, contains(equalTo("foo"), equalTo("bar")))
        +
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items in the examined array
        +
        +
      • +
      + + + +
        +
      • +

        arrayContaining

        +
        public static <E> Matcher<E[]> arrayContaining(java.util.List<Matcher<? super E>> itemMatchers)
        +
        Deprecated. As of version 2.1, use ArrayMatching.arrayContaining(List).
        +
        Creates a matcher for arrays that matches when each item in the examined array satisfies the + corresponding matcher in the specified list of matchers. For a positive match, the examined array + must be of the same length as the specified list of matchers. +

        + For example: +

        assertThat(new String[]{"foo", "bar"}, contains(Arrays.asList(equalTo("foo"), equalTo("bar"))))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by the corresponding item in an examined array
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsArrayWithSize.html b/docs/javadoc/2.1/org/hamcrest/collection/IsArrayWithSize.html new file mode 100644 index 00000000..be0dfaa1 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsArrayWithSize.html @@ -0,0 +1,392 @@ + + + + + +IsArrayWithSize (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsArrayWithSize<E>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<E[]>, SelfDescribing
    +
    +
    +
    +
    public class IsArrayWithSize<E>
    +extends FeatureMatcher<E[],java.lang.Integer>
    +
    Matches if array size satisfies a nested matcher.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsArrayWithSize

        +
        public IsArrayWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        featureValueOf

        +
        protected java.lang.Integer featureValueOf(E[] actual)
        +
        Description copied from class: FeatureMatcher
        +
        Implement this to extract the interesting feature.
        +
        +
        Specified by:
        +
        featureValueOf in class FeatureMatcher<E[],java.lang.Integer>
        +
        Parameters:
        +
        actual - the target object
        +
        Returns:
        +
        the feature to be matched
        +
        +
      • +
      + + + +
        +
      • +

        arrayWithSize

        +
        public static <E> Matcher<E[]> arrayWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
        +
        Creates a matcher for arrays that matches when the length of the array + satisfies the specified matcher. + For example: +
        assertThat(new String[]{"foo", "bar"}, arrayWithSize(equalTo(2)))
        +
        +
        Parameters:
        +
        sizeMatcher - a matcher for the length of an examined array
        +
        +
      • +
      + + + +
        +
      • +

        arrayWithSize

        +
        public static <E> Matcher<E[]> arrayWithSize(int size)
        +
        Creates a matcher for arrays that matches when the length of the array + equals the specified size. + For example: +
        assertThat(new String[]{"foo", "bar"}, arrayWithSize(2))
        +
        +
        Parameters:
        +
        size - the length that an examined array must have for a positive match
        +
        +
      • +
      + + + +
        +
      • +

        emptyArray

        +
        public static <E> Matcher<E[]> emptyArray()
        +
        Creates a matcher for arrays that matches when the length of the array + is zero. + For example: +
        assertThat(new String[0], emptyArray())
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsCollectionWithSize.html b/docs/javadoc/2.1/org/hamcrest/collection/IsCollectionWithSize.html new file mode 100644 index 00000000..20bf914a --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsCollectionWithSize.html @@ -0,0 +1,370 @@ + + + + + +IsCollectionWithSize (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsCollectionWithSize<E>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.util.Collection<? extends E>>, SelfDescribing
    +
    +
    +
    +
    public class IsCollectionWithSize<E>
    +extends FeatureMatcher<java.util.Collection<? extends E>,java.lang.Integer>
    +
    Matches if collection size satisfies a nested matcher.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsCollectionWithSize

        +
        public IsCollectionWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        featureValueOf

        +
        protected java.lang.Integer featureValueOf(java.util.Collection<? extends E> actual)
        +
        Description copied from class: FeatureMatcher
        +
        Implement this to extract the interesting feature.
        +
        +
        Specified by:
        +
        featureValueOf in class FeatureMatcher<java.util.Collection<? extends E>,java.lang.Integer>
        +
        Parameters:
        +
        actual - the target object
        +
        Returns:
        +
        the feature to be matched
        +
        +
      • +
      + + + +
        +
      • +

        hasSize

        +
        public static <E> Matcher<java.util.Collection<? extends E>> hasSize(Matcher<? super java.lang.Integer> sizeMatcher)
        +
        Creates a matcher for Collections that matches when the size() method returns + a value that satisfies the specified matcher. + For example: +
        assertThat(Arrays.asList("foo", "bar"), hasSize(equalTo(2)))
        +
        +
        Parameters:
        +
        sizeMatcher - a matcher for the size of an examined Collection
        +
        +
      • +
      + + + +
        +
      • +

        hasSize

        +
        public static <E> Matcher<java.util.Collection<? extends E>> hasSize(int size)
        +
        Creates a matcher for Collections that matches when the size() method returns + a value equal to the specified size. + For example: +
        assertThat(Arrays.asList("foo", "bar"), hasSize(2))
        +
        +
        Parameters:
        +
        size - the expected size of an examined Collection
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsEmptyCollection.html b/docs/javadoc/2.1/org/hamcrest/collection/IsEmptyCollection.html new file mode 100644 index 00000000..76cd806f --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsEmptyCollection.html @@ -0,0 +1,398 @@ + + + + + +IsEmptyCollection (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsEmptyCollection<E>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.util.Collection<? extends E>>, SelfDescribing
    +
    +
    +
    +
    public class IsEmptyCollection<E>
    +extends TypeSafeMatcher<java.util.Collection<? extends E>>
    +
    Tests if collection is empty.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsEmptyCollection

        +
        public IsEmptyCollection()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.util.Collection<? extends E> item)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.util.Collection<? extends E>>
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(java.util.Collection<? extends E> item,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<java.util.Collection<? extends E>>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        empty

        +
        public static <E> Matcher<java.util.Collection<? extends E>> empty()
        +
        Creates a matcher for Collections matching examined collections whose isEmpty + method returns true. + For example: +
        assertThat(new ArrayList<String>(), is(empty()))
        +
      • +
      + + + +
        +
      • +

        emptyCollectionOf

        +
        public static <E> Matcher<java.util.Collection<E>> emptyCollectionOf(java.lang.Class<E> unusedToForceReturnType)
        +
        Creates a matcher for Collections matching examined collections whose isEmpty + method returns true. + For example: +
        assertThat(new ArrayList<String>(), is(emptyCollectionOf(String.class)))
        +
        +
        Parameters:
        +
        unusedToForceReturnType - the type of the collection's content
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsEmptyIterable.html b/docs/javadoc/2.1/org/hamcrest/collection/IsEmptyIterable.html new file mode 100644 index 00000000..2506d356 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsEmptyIterable.html @@ -0,0 +1,394 @@ + + + + + +IsEmptyIterable (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsEmptyIterable<E>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.Iterable<? extends E>>, SelfDescribing
    +
    +
    +
    +
    public class IsEmptyIterable<E>
    +extends TypeSafeMatcher<java.lang.Iterable<? extends E>>
    +
    Tests if collection is empty.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsEmptyIterable

        +
        public IsEmptyIterable()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.lang.Iterable<? extends E> iterable)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.lang.Iterable<? extends E>>
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(java.lang.Iterable<? extends E> iter,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<java.lang.Iterable<? extends E>>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        emptyIterable

        +
        public static <E> Matcher<java.lang.Iterable<? extends E>> emptyIterable()
        +
        Creates a matcher for Iterables matching examined iterables that yield no items. + For example: +
        assertThat(new ArrayList<String>(), is(emptyIterable()))
        +
      • +
      + + + +
        +
      • +

        emptyIterableOf

        +
        public static <E> Matcher<java.lang.Iterable<E>> emptyIterableOf(java.lang.Class<E> unusedToForceReturnType)
        +
        Creates a matcher for Iterables matching examined iterables that yield no items. + For example: +
        assertThat(new ArrayList<String>(), is(emptyIterableOf(String.class)))
        +
        +
        Parameters:
        +
        unusedToForceReturnType - the type of the iterable's content
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsIn.html b/docs/javadoc/2.1/org/hamcrest/collection/IsIn.html new file mode 100644 index 00000000..df90881e --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsIn.html @@ -0,0 +1,502 @@ + + + + + +IsIn (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsIn<T>

+
+
+ +
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      IsIn(java.util.Collection<T> collection) 
      IsIn(T[] elements) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and TypeMethod and Description
      voiddescribeTo(Description buffer) +
      Generates a description of the object.
      +
      static <T> Matcher<T>in(java.util.Collection<T> collection) +
      Creates a matcher that matches when the examined object is found within the + specified collection.
      +
      static <T> Matcher<T>in(T[] elements) +
      Creates a matcher that matches when the examined object is found within the + specified array.
      +
      static <T> Matcher<T>isIn(java.util.Collection<T> collection) +
      Deprecated.  +
      use is(in(...)) instead
      +
      +
      static <T> Matcher<T>isIn(T[] elements) +
      Deprecated.  +
      use is(in(...)) instead
      +
      +
      static <T> Matcher<T>isOneOf(T... elements) +
      Deprecated.  +
      use is(oneOf(...)) instead
      +
      +
      booleanmatches(java.lang.Object o) +
      Evaluates the matcher for argument item.
      +
      static <T> Matcher<T>oneOf(T... elements) +
      Creates a matcher that matches when the examined object is equal to one of the + specified elements.
      +
      + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsIn

        +
        public IsIn(java.util.Collection<T> collection)
        +
      • +
      + + + + + +
        +
      • +

        IsIn

        +
        public IsIn(T[] elements)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matches

        +
        public boolean matches(java.lang.Object o)
        +
        Description copied from interface: Matcher
        +
        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 - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description buffer)
        +
        Description copied from interface: SelfDescribing
        +
        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:
        +
        buffer - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        isIn

        +
        @Deprecated
        +public static <T> Matcher<T> isIn(java.util.Collection<T> collection)
        +
        Deprecated. use is(in(...)) instead
        +
        Creates a matcher that matches when the examined object is found within the + specified collection. + For example: +
        assertThat("foo", isIn(Arrays.asList("bar", "foo")))
        +
        +
        Parameters:
        +
        collection - the collection in which matching items must be found
        +
        +
      • +
      + + + +
        +
      • +

        in

        +
        public static <T> Matcher<T> in(java.util.Collection<T> collection)
        +
        Creates a matcher that matches when the examined object is found within the + specified collection. + For example: +
        assertThat("foo", is(in(Arrays.asList("bar", "foo"))))
        +
        +
        Parameters:
        +
        collection - the collection in which matching items must be found
        +
        +
      • +
      + + + + + +
        +
      • +

        isIn

        +
        @Deprecated
        +public static <T> Matcher<T> isIn(T[] elements)
        +
        Deprecated. use is(in(...)) instead
        +
        Creates a matcher that matches when the examined object is found within the + specified array. + For example: +
        assertThat("foo", isIn(new String[]{"bar", "foo"}))
        +
        +
        Parameters:
        +
        elements - the array in which matching items must be found
        +
        +
      • +
      + + + + + +
        +
      • +

        in

        +
        public static <T> Matcher<T> in(T[] elements)
        +
        Creates a matcher that matches when the examined object is found within the + specified array. + For example: +
        assertThat("foo", is(in(new String[]{"bar", "foo"})))
        +
        +
        Parameters:
        +
        elements - the array in which matching items must be found
        +
        +
      • +
      + + + + + +
        +
      • +

        isOneOf

        +
        @SafeVarargs
        + @Deprecated
        +public static <T> Matcher<T> isOneOf(T... elements)
        +
        Deprecated. use is(oneOf(...)) instead
        +
        Creates a matcher that matches when the examined object is equal to one of the + specified elements. + For example: +
        assertThat("foo", isOneOf("bar", "foo"))
        +
        +
        Parameters:
        +
        elements - the elements amongst which matching items will be found
        +
        +
      • +
      + + + + + +
        +
      • +

        oneOf

        +
        @SafeVarargs
        +public static <T> Matcher<T> oneOf(T... elements)
        +
        Creates a matcher that matches when the examined object is equal to one of the + specified elements. + For example: +
        assertThat("foo", is(oneOf("bar", "foo")))
        +
        +
        Parameters:
        +
        elements - the elements amongst which matching items will be found
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsIterableContainingInAnyOrder.html b/docs/javadoc/2.1/org/hamcrest/collection/IsIterableContainingInAnyOrder.html new file mode 100644 index 00000000..d99e9671 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsIterableContainingInAnyOrder.html @@ -0,0 +1,444 @@ + + + + + +IsIterableContainingInAnyOrder (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsIterableContainingInAnyOrder<T>

+
+
+ +
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static <T> Matcher<java.lang.Iterable<? extends T>>containsInAnyOrder(java.util.Collection<Matcher<? super T>> itemMatchers) +
      + Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each satisfying one matcher anywhere + in the specified collection of matchers.
      +
      static <T> Matcher<java.lang.Iterable<? extends T>>containsInAnyOrder(Matcher<? super T>... itemMatchers) +
      + Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each satisfying one matcher anywhere + in the specified matchers.
      +
      static <T> Matcher<java.lang.Iterable<? extends T>>containsInAnyOrder(T... items) +
      + Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each logically equal to one item + anywhere in the specified items.
      +
      voiddescribeTo(Description description) +
      Generates a description of the object.
      +
      protected booleanmatchesSafely(java.lang.Iterable<? extends T> items, + Description mismatchDescription) +
      Subclasses should implement this.
      +
      + + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsIterableContainingInAnyOrder

        +
        public IsIterableContainingInAnyOrder(java.util.Collection<Matcher<? super T>> matchers)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        protected boolean matchesSafely(java.lang.Iterable<? extends T> items,
        +                                Description mismatchDescription)
        +
        Description copied from class: TypeSafeDiagnosingMatcher
        +
        Subclasses should implement this. The item will already have been checked + for the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeDiagnosingMatcher<java.lang.Iterable<? extends T>>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        containsInAnyOrder

        +
        @SafeVarargs
        +public static <T> Matcher<java.lang.Iterable<? extends T>> containsInAnyOrder(Matcher<? super T>... itemMatchers)
        +

        + Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each satisfying one matcher anywhere + in the specified matchers. For a positive match, the examined iterable must be of the same + length as the number of specified matchers. +

        +

        + N.B. each of the specified matchers will only be used once during a given examination, so be + careful when specifying matchers that may be satisfied by more than one entry in an examined + iterable. +

        +

        + For example: +

        +
        assertThat(Arrays.asList("foo", "bar"), containsInAnyOrder(equalTo("bar"), equalTo("foo")))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        containsInAnyOrder

        +
        @SafeVarargs
        +public static <T> Matcher<java.lang.Iterable<? extends T>> containsInAnyOrder(T... items)
        +

        + Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each logically equal to one item + anywhere in the specified items. For a positive match, the examined iterable + must be of the same length as the number of specified items. +

        +

        + N.B. each of the specified items will only be used once during a given examination, so be + careful when specifying items that may be equal to more than one entry in an examined + iterable. +

        +

        + For example: +

        +
        assertThat(Arrays.asList("foo", "bar"), containsInAnyOrder("bar", "foo"))
        +
        +
        Parameters:
        +
        items - the items that must equal the items provided by an examined Iterable in any order
        +
        +
      • +
      + + + +
        +
      • +

        containsInAnyOrder

        +
        public static <T> Matcher<java.lang.Iterable<? extends T>> containsInAnyOrder(java.util.Collection<Matcher<? super T>> itemMatchers)
        +

        + Creates an order agnostic matcher for Iterables that matches when a single pass over + the examined Iterable yields a series of items, each satisfying one matcher anywhere + in the specified collection of matchers. For a positive match, the examined iterable + must be of the same length as the specified collection of matchers. +

        +

        + N.B. each matcher in the specified collection will only be used once during a given + examination, so be careful when specifying matchers that may be satisfied by more than + one entry in an examined iterable. +

        +

        For example:

        +
        assertThat(Arrays.asList("foo", "bar"), containsInAnyOrder(Arrays.asList(equalTo("bar"), equalTo("foo"))))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined Iterable
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsIterableContainingInOrder.html b/docs/javadoc/2.1/org/hamcrest/collection/IsIterableContainingInOrder.html new file mode 100644 index 00000000..c1b141ce --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsIterableContainingInOrder.html @@ -0,0 +1,443 @@ + + + + + +IsIterableContainingInOrder (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsIterableContainingInOrder<E>

+
+
+ +
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static <E> Matcher<java.lang.Iterable<? extends E>>contains(E... items) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each logically equal to the + corresponding item in the specified items.
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>contains(java.util.List<Matcher<? super E>> itemMatchers) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each satisfying the corresponding + matcher in the specified list of matchers.
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>contains(Matcher<? super E>... itemMatchers) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each satisfying the corresponding + matcher in the specified matchers.
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>contains(Matcher<? super E> itemMatcher) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a single item that satisfies the specified matcher.
      +
      voiddescribeTo(Description description) +
      Generates a description of the object.
      +
      protected booleanmatchesSafely(java.lang.Iterable<? extends E> iterable, + Description mismatchDescription) +
      Subclasses should implement this.
      +
      + + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsIterableContainingInOrder

        +
        public IsIterableContainingInOrder(java.util.List<Matcher<? super E>> matchers)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        protected boolean matchesSafely(java.lang.Iterable<? extends E> iterable,
        +                                Description mismatchDescription)
        +
        Description copied from class: TypeSafeDiagnosingMatcher
        +
        Subclasses should implement this. The item will already have been checked + for the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeDiagnosingMatcher<java.lang.Iterable<? extends E>>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + + + +
        +
      • +

        contains

        +
        @SafeVarargs
        +public static <E> Matcher<java.lang.Iterable<? extends E>> contains(E... items)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each logically equal to the + corresponding item in the specified items. For a positive match, the examined iterable + must be of the same length as the number of specified items. + For example: +
        assertThat(Arrays.asList("foo", "bar"), contains("foo", "bar"))
        +
        +
        Parameters:
        +
        items - the items that must equal the items provided by an examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        contains

        +
        public static <E> Matcher<java.lang.Iterable<? extends E>> contains(Matcher<? super E> itemMatcher)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a single item that satisfies the specified matcher. + For a positive match, the examined iterable must only yield one item. + For example: +
        assertThat(Arrays.asList("foo"), contains(equalTo("foo")))
        +
        +
        Parameters:
        +
        itemMatcher - the matcher that must be satisfied by the single item provided by an + examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        contains

        +
        @SafeVarargs
        +public static <E> Matcher<java.lang.Iterable<? extends E>> contains(Matcher<? super E>... itemMatchers)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each satisfying the corresponding + matcher in the specified matchers. For a positive match, the examined iterable + must be of the same length as the number of specified matchers. + For example: +
        assertThat(Arrays.asList("foo", "bar"), contains(equalTo("foo"), equalTo("bar")))
        +
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items provided by an examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        contains

        +
        public static <E> Matcher<java.lang.Iterable<? extends E>> contains(java.util.List<Matcher<? super E>> itemMatchers)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, each satisfying the corresponding + matcher in the specified list of matchers. For a positive match, the examined iterable + must be of the same length as the specified list of matchers. + For example: +
        assertThat(Arrays.asList("foo", "bar"), contains(Arrays.asList(equalTo("foo"), equalTo("bar"))))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by the corresponding item provided by + an examined Iterable
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsIterableContainingInRelativeOrder.html b/docs/javadoc/2.1/org/hamcrest/collection/IsIterableContainingInRelativeOrder.html new file mode 100644 index 00000000..d103639e --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsIterableContainingInRelativeOrder.html @@ -0,0 +1,415 @@ + + + + + +IsIterableContainingInRelativeOrder (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsIterableContainingInRelativeOrder<E>

+
+
+ +
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static <E> Matcher<java.lang.Iterable<? extends E>>containsInRelativeOrder(E... items) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that contains items logically equal to the + corresponding item in the specified items, in the same relative order + For example:
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>containsInRelativeOrder(java.util.List<Matcher<? super E>> itemMatchers) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that contains items satisfying the corresponding + matcher in the specified list of matchers, in the same relative order.
      +
      static <E> Matcher<java.lang.Iterable<? extends E>>containsInRelativeOrder(Matcher<? super E>... itemMatchers) +
      Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that each satisfying the corresponding + matcher in the specified matchers, in the same relative order.
      +
      voiddescribeTo(Description description) +
      Generates a description of the object.
      +
      protected booleanmatchesSafely(java.lang.Iterable<? extends E> iterable, + Description mismatchDescription) +
      Subclasses should implement this.
      +
      + + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsIterableContainingInRelativeOrder

        +
        public IsIterableContainingInRelativeOrder(java.util.List<Matcher<? super E>> matchers)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        protected boolean matchesSafely(java.lang.Iterable<? extends E> iterable,
        +                                Description mismatchDescription)
        +
        Description copied from class: TypeSafeDiagnosingMatcher
        +
        Subclasses should implement this. The item will already have been checked + for the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeDiagnosingMatcher<java.lang.Iterable<? extends E>>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + + + +
        +
      • +

        containsInRelativeOrder

        +
        @SafeVarargs
        +public static <E> Matcher<java.lang.Iterable<? extends E>> containsInRelativeOrder(E... items)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that contains items logically equal to the + corresponding item in the specified items, in the same relative order + For example: +
        assertThat(Arrays.asList("a", "b", "c", "d", "e"), containsInRelativeOrder("b", "d"))
        +
        +
        Parameters:
        +
        items - the items that must be contained within items provided by an examined Iterable in the same relative order
        +
        +
      • +
      + + + +
        +
      • +

        containsInRelativeOrder

        +
        @SafeVarargs
        +public static <E> Matcher<java.lang.Iterable<? extends E>> containsInRelativeOrder(Matcher<? super E>... itemMatchers)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that each satisfying the corresponding + matcher in the specified matchers, in the same relative order. + For example: +
        assertThat(Arrays.asList("a", "b", "c", "d", "e"), containsInRelativeOrder(equalTo("b"), equalTo("d")))
        +
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items provided by an examined Iterable in the same relative order
        +
        +
      • +
      + + + +
        +
      • +

        containsInRelativeOrder

        +
        public static <E> Matcher<java.lang.Iterable<? extends E>> containsInRelativeOrder(java.util.List<Matcher<? super E>> itemMatchers)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields a series of items, that contains items satisfying the corresponding + matcher in the specified list of matchers, in the same relative order. + For example: +
        assertThat(Arrays.asList("a", "b", "c", "d", "e"), contains(Arrays.asList(equalTo("b"), equalTo("d"))))
        +
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by the items provided by + an examined Iterable in the same relative order
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsIterableWithSize.html b/docs/javadoc/2.1/org/hamcrest/collection/IsIterableWithSize.html new file mode 100644 index 00000000..557c86ee --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsIterableWithSize.html @@ -0,0 +1,373 @@ + + + + + +IsIterableWithSize (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsIterableWithSize<E>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.Iterable<E>>, SelfDescribing
    +
    +
    +
    +
    public class IsIterableWithSize<E>
    +extends FeatureMatcher<java.lang.Iterable<E>,java.lang.Integer>
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsIterableWithSize

        +
        public IsIterableWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        featureValueOf

        +
        protected java.lang.Integer featureValueOf(java.lang.Iterable<E> actual)
        +
        Description copied from class: FeatureMatcher
        +
        Implement this to extract the interesting feature.
        +
        +
        Specified by:
        +
        featureValueOf in class FeatureMatcher<java.lang.Iterable<E>,java.lang.Integer>
        +
        Parameters:
        +
        actual - the target object
        +
        Returns:
        +
        the feature to be matched
        +
        +
      • +
      + + + +
        +
      • +

        iterableWithSize

        +
        public static <E> Matcher<java.lang.Iterable<E>> iterableWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields an item count that satisfies the specified + matcher. + For example: +
        assertThat(Arrays.asList("foo", "bar"), iterableWithSize(equalTo(2)))
        +
        +
        Parameters:
        +
        sizeMatcher - a matcher for the number of items that should be yielded by an examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        iterableWithSize

        +
        public static <E> Matcher<java.lang.Iterable<E>> iterableWithSize(int size)
        +
        Creates a matcher for Iterables that matches when a single pass over the + examined Iterable yields an item count that is equal to the specified + size argument. + For example: +
        assertThat(Arrays.asList("foo", "bar"), iterableWithSize(2))
        +
        +
        Parameters:
        +
        size - the number of items that should be yielded by an examined Iterable
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsMapContaining.html b/docs/javadoc/2.1/org/hamcrest/collection/IsMapContaining.html new file mode 100644 index 00000000..7893d426 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsMapContaining.html @@ -0,0 +1,515 @@ + + + + + +IsMapContaining (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsMapContaining<K,V>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.util.Map<? extends K,? extends V>>, SelfDescribing
    +
    +
    +
    +
    public class IsMapContaining<K,V>
    +extends TypeSafeMatcher<java.util.Map<? extends K,? extends V>>
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      IsMapContaining(Matcher<? super K> keyMatcher, + Matcher<? super V> valueMatcher) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voiddescribeMismatchSafely(java.util.Map<? extends K,? extends V> map, + Description mismatchDescription) +
      Subclasses should override this.
      +
      voiddescribeTo(Description description) +
      Generates a description of the object.
      +
      static <K,V> Matcher<java.util.Map<? extends K,? extends V>>hasEntry(K key, + V value) +
      Creates a matcher for Maps matching when the examined Map contains + at least one entry whose key equals the specified key and whose value equals the + specified value.
      +
      static <K,V> Matcher<java.util.Map<? extends K,? extends V>>hasEntry(Matcher<? super K> keyMatcher, + Matcher<? super V> valueMatcher) +
      Creates a matcher for Maps matching when the examined Map contains + at least one entry whose key satisfies the specified keyMatcher and whose + value satisfies the specified valueMatcher.
      +
      static <K> Matcher<java.util.Map<? extends K,?>>hasKey(K key) +
      Creates a matcher for Maps matching when the examined Map contains + at least one key that is equal to the specified key.
      +
      static <K> Matcher<java.util.Map<? extends K,?>>hasKey(Matcher<? super K> keyMatcher) +
      Creates a matcher for Maps matching when the examined Map contains + at least one key that satisfies the specified matcher.
      +
      static <V> Matcher<java.util.Map<?,? extends V>>hasValue(Matcher<? super V> valueMatcher) +
      Creates a matcher for Maps matching when the examined Map contains + at least one value that satisfies the specified valueMatcher.
      +
      static <V> Matcher<java.util.Map<?,? extends V>>hasValue(V value) +
      Creates a matcher for Maps matching when the examined Map contains + at least one value that is equal to the specified value.
      +
      booleanmatchesSafely(java.util.Map<? extends K,? extends V> map) +
      Subclasses should implement this.
      +
      + + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsMapContaining

        +
        public IsMapContaining(Matcher<? super K> keyMatcher,
        +                       Matcher<? super V> valueMatcher)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.util.Map<? extends K,? extends V> map)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.util.Map<? extends K,? extends V>>
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(java.util.Map<? extends K,? extends V> map,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<java.util.Map<? extends K,? extends V>>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        hasEntry

        +
        public static <K,V> Matcher<java.util.Map<? extends K,? extends V>> hasEntry(Matcher<? super K> keyMatcher,
        +                                                                             Matcher<? super V> valueMatcher)
        +
        Creates a matcher for Maps matching when the examined Map contains + at least one entry whose key satisfies the specified keyMatcher and whose + value satisfies the specified valueMatcher. + For example: +
        assertThat(myMap, hasEntry(equalTo("bar"), equalTo("foo")))
        +
        +
        Parameters:
        +
        keyMatcher - the key matcher that, in combination with the valueMatcher, must be satisfied by at least one entry
        +
        valueMatcher - the value matcher that, in combination with the keyMatcher, must be satisfied by at least one entry
        +
        +
      • +
      + + + + + +
        +
      • +

        hasEntry

        +
        public static <K,V> Matcher<java.util.Map<? extends K,? extends V>> hasEntry(K key,
        +                                                                             V value)
        +
        Creates a matcher for Maps matching when the examined Map contains + at least one entry whose key equals the specified key and whose value equals the + specified value. + For example: +
        assertThat(myMap, hasEntry("bar", "foo"))
        +
        +
        Parameters:
        +
        key - the key that, in combination with the value, must be describe at least one entry
        +
        value - the value that, in combination with the key, must be describe at least one entry
        +
        +
      • +
      + + + +
        +
      • +

        hasKey

        +
        public static <K> Matcher<java.util.Map<? extends K,?>> hasKey(Matcher<? super K> keyMatcher)
        +
        Creates a matcher for Maps matching when the examined Map contains + at least one key that satisfies the specified matcher. + For example: +
        assertThat(myMap, hasKey(equalTo("bar")))
        +
        +
        Parameters:
        +
        keyMatcher - the matcher that must be satisfied by at least one key
        +
        +
      • +
      + + + + + +
        +
      • +

        hasKey

        +
        public static <K> Matcher<java.util.Map<? extends K,?>> hasKey(K key)
        +
        Creates a matcher for Maps matching when the examined Map contains + at least one key that is equal to the specified key. + For example: +
        assertThat(myMap, hasKey("bar"))
        +
        +
        Parameters:
        +
        key - the key that satisfying maps must contain
        +
        +
      • +
      + + + +
        +
      • +

        hasValue

        +
        public static <V> Matcher<java.util.Map<?,? extends V>> hasValue(Matcher<? super V> valueMatcher)
        +
        Creates a matcher for Maps matching when the examined Map contains + at least one value that satisfies the specified valueMatcher. + For example: +
        assertThat(myMap, hasValue(equalTo("foo")))
        +
        +
        Parameters:
        +
        valueMatcher - the matcher that must be satisfied by at least one value
        +
        +
      • +
      + + + + + +
        +
      • +

        hasValue

        +
        public static <V> Matcher<java.util.Map<?,? extends V>> hasValue(V value)
        +
        Creates a matcher for Maps matching when the examined Map contains + at least one value that is equal to the specified value. + For example: +
        assertThat(myMap, hasValue("foo"))
        +
        +
        Parameters:
        +
        value - the value that satisfying maps must contain
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/IsMapWithSize.html b/docs/javadoc/2.1/org/hamcrest/collection/IsMapWithSize.html new file mode 100644 index 00000000..d09f40f2 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/IsMapWithSize.html @@ -0,0 +1,390 @@ + + + + + +IsMapWithSize (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.collection
+

Class IsMapWithSize<K,V>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.util.Map<? extends K,? extends V>>, SelfDescribing
    +
    +
    +
    +
    public final class IsMapWithSize<K,V>
    +extends FeatureMatcher<java.util.Map<? extends K,? extends V>,java.lang.Integer>
    +
    Matches if map size satisfies a nested matcher.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsMapWithSize

        +
        public IsMapWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        featureValueOf

        +
        protected java.lang.Integer featureValueOf(java.util.Map<? extends K,? extends V> actual)
        +
        Description copied from class: FeatureMatcher
        +
        Implement this to extract the interesting feature.
        +
        +
        Specified by:
        +
        featureValueOf in class FeatureMatcher<java.util.Map<? extends K,? extends V>,java.lang.Integer>
        +
        Parameters:
        +
        actual - the target object
        +
        Returns:
        +
        the feature to be matched
        +
        +
      • +
      + + + +
        +
      • +

        aMapWithSize

        +
        public static <K,V> Matcher<java.util.Map<? extends K,? extends V>> aMapWithSize(Matcher<? super java.lang.Integer> sizeMatcher)
        +
        Creates a matcher for Maps that matches when the size() method returns + a value that satisfies the specified matcher. + For example: +
        assertThat(myMap, is(aMapWithSize(equalTo(2))))
        +
        +
        Parameters:
        +
        sizeMatcher - a matcher for the size of an examined Map
        +
        +
      • +
      + + + +
        +
      • +

        aMapWithSize

        +
        public static <K,V> Matcher<java.util.Map<? extends K,? extends V>> aMapWithSize(int size)
        +
        Creates a matcher for Maps that matches when the size() method returns + a value equal to the specified size. + For example: +
        assertThat(myMap, is(aMapWithSize(2)))
        +
        +
        Parameters:
        +
        size - the expected size of an examined Map
        +
        +
      • +
      + + + +
        +
      • +

        anEmptyMap

        +
        public static <K,V> Matcher<java.util.Map<? extends K,? extends V>> anEmptyMap()
        +
        Creates a matcher for Maps that matches when the size() method returns + zero. + For example: +
        assertThat(myMap, is(anEmptyMap()))
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/package-frame.html b/docs/javadoc/2.1/org/hamcrest/collection/package-frame.html new file mode 100644 index 00000000..8dd61c00 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/package-frame.html @@ -0,0 +1,36 @@ + + + + + +org.hamcrest.collection (Hamcrest 2.1 API) + + + + + +

org.hamcrest.collection

+ + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/package-summary.html b/docs/javadoc/2.1/org/hamcrest/collection/package-summary.html new file mode 100644 index 00000000..58bb8071 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/package-summary.html @@ -0,0 +1,231 @@ + + + + + +org.hamcrest.collection (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Package org.hamcrest.collection

+
+
Matchers of arrays and collections.
+
+

See: Description

+
+
+ + + + +

Package org.hamcrest.collection Description

+

Matchers of arrays and collections.

+
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/collection/package-tree.html b/docs/javadoc/2.1/org/hamcrest/collection/package-tree.html new file mode 100644 index 00000000..fb5b615e --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/collection/package-tree.html @@ -0,0 +1,167 @@ + + + + + +org.hamcrest.collection Class Hierarchy (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.collection

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/comparator/ComparatorMatcherBuilder.html b/docs/javadoc/2.1/org/hamcrest/comparator/ComparatorMatcherBuilder.html new file mode 100644 index 00000000..f551bf28 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/comparator/ComparatorMatcherBuilder.html @@ -0,0 +1,406 @@ + + + + + +ComparatorMatcherBuilder (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.comparator
+

Class ComparatorMatcherBuilder<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.comparator.ComparatorMatcherBuilder<T>
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public final class ComparatorMatcherBuilder<T>
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static <T> ComparatorMatcherBuilder<T>comparedBy(java.util.Comparator<T> comparator) +
      Creates a matcher factory for matchers of Comparatorss of T.
      +
      Matcher<T>comparesEqualTo(T value) +
      Creates a matcher of T object that matches when the examined object is + equal to the specified value, as reported by the Comparator used to + create this builder.
      +
      Matcher<T>greaterThan(T value) +
      Creates a matcher of T object that matches when the examined object is + greater than the specified value, as reported by the Comparator used to + create this builder.
      +
      Matcher<T>greaterThanOrEqualTo(T value) +
      Creates a matcher of T object that matches when the examined object is + greater than or equal to the specified value, as reported by the Comparator used to + create this builder.
      +
      Matcher<T>lessThan(T value) +
      Creates a matcher of T object that matches when the examined object is + less than the specified value, as reported by the Comparator used to + create this builder.
      +
      Matcher<T>lessThanOrEqualTo(T value) +
      Creates a matcher of T object that matches when the examined object is + less than or equal to the specified value, as reported by the Comparator used to + create this builder.
      +
      static <T extends java.lang.Comparable<T>>
      ComparatorMatcherBuilder<T>
      usingNaturalOrdering() +
      Creates a matcher factory for matchers of Comparables.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        usingNaturalOrdering

        +
        public static <T extends java.lang.Comparable<T>> ComparatorMatcherBuilder<T> usingNaturalOrdering()
        +
        Creates a matcher factory for matchers of Comparables. + For example: +
        assertThat(1, ComparatorMatcherBuilder.<Integer>usingNaturalOrdering().lessThanOrEqualTo(1))
        +
      • +
      + + + +
        +
      • +

        comparedBy

        +
        public static <T> ComparatorMatcherBuilder<T> comparedBy(java.util.Comparator<T> comparator)
        +
        Creates a matcher factory for matchers of Comparatorss of T. + For example: +
        assertThat(5, comparedBy(new Comparator<Integer>() {
        + public int compare(Integer o1, Integer o2) {
        + return -o1.compareTo(o2);
        + }
        + }).lessThan(4))
        +
      • +
      + + + + + +
        +
      • +

        comparesEqualTo

        +
        public Matcher<T> comparesEqualTo(T value)
        +
        Creates a matcher of T object that matches when the examined object is + equal to the specified value, as reported by the Comparator used to + create this builder. + For example: +
        assertThat(1, ComparatorMatcherBuilder.<Integer>usingNaturalOrdering().comparesEqualTo(1))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the Comparator supplied to this builder, should return zero
        +
        +
      • +
      + + + + + +
        +
      • +

        greaterThan

        +
        public Matcher<T> greaterThan(T value)
        +
        Creates a matcher of T object that matches when the examined object is + greater than the specified value, as reported by the Comparator used to + create this builder. + For example: +
        assertThat(2, ComparatorMatcherBuilder.<Integer>usingNaturalOrdering().greaterThan(1))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the Comparator supplied to this builder, should return greater + than zero
        +
        +
      • +
      + + + + + +
        +
      • +

        greaterThanOrEqualTo

        +
        public Matcher<T> greaterThanOrEqualTo(T value)
        +
        Creates a matcher of T object that matches when the examined object is + greater than or equal to the specified value, as reported by the Comparator used to + create this builder. + For example: +
        assertThat(1, ComparatorMatcherBuilder.<Integer>usingNaturalOrdering().greaterThanOrEqualTo(1))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the Comparator supplied to this builder, should return greater + than or equal to zero
        +
        +
      • +
      + + + + + +
        +
      • +

        lessThan

        +
        public Matcher<T> lessThan(T value)
        +
        Creates a matcher of T object that matches when the examined object is + less than the specified value, as reported by the Comparator used to + create this builder. + For example: +
        assertThat(1, ComparatorMatcherBuilder.<Integer>usingNaturalOrdering().lessThan(2))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the Comparator supplied to this builder, should return less + than zero
        +
        +
      • +
      + + + + + +
        +
      • +

        lessThanOrEqualTo

        +
        public Matcher<T> lessThanOrEqualTo(T value)
        +
        Creates a matcher of T object that matches when the examined object is + less than or equal to the specified value, as reported by the Comparator used to + create this builder. + For example: +
        assertThat(1, ComparatorMatcherBuilder.<Integer>usingNaturalOrdering().lessThanOrEqualTo(1))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the Comparator supplied to this builder, should return less + than or equal to zero
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/comparator/package-frame.html b/docs/javadoc/2.1/org/hamcrest/comparator/package-frame.html new file mode 100644 index 00000000..b23c1bc0 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/comparator/package-frame.html @@ -0,0 +1,20 @@ + + + + + +org.hamcrest.comparator (Hamcrest 2.1 API) + + + + + +

org.hamcrest.comparator

+
+

Classes

+ +
+ + diff --git a/docs/javadoc/2.1/org/hamcrest/comparator/package-summary.html b/docs/javadoc/2.1/org/hamcrest/comparator/package-summary.html new file mode 100644 index 00000000..61dbc6fd --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/comparator/package-summary.html @@ -0,0 +1,140 @@ + + + + + +org.hamcrest.comparator (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Package org.hamcrest.comparator

+
+
+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/comparator/package-tree.html b/docs/javadoc/2.1/org/hamcrest/comparator/package-tree.html new file mode 100644 index 00000000..0a82c5a9 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/comparator/package-tree.html @@ -0,0 +1,135 @@ + + + + + +org.hamcrest.comparator Class Hierarchy (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.comparator

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/AllOf.html b/docs/javadoc/2.1/org/hamcrest/core/AllOf.html new file mode 100644 index 00000000..ce900763 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/AllOf.html @@ -0,0 +1,365 @@ + + + + + +AllOf (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class AllOf<T>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public class AllOf<T>
    +extends DiagnosingMatcher<T>
    +
    Calculates the logical conjunction of multiple matchers. Evaluation is shortcut, so + subsequent matchers are not called if an earlier matcher returns false.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AllOf

        +
        public AllOf(java.lang.Iterable<Matcher<? super T>> matchers)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        allOf

        +
        public static <T> Matcher<T> allOf(java.lang.Iterable<Matcher<? super T>> matchers)
        +
        Creates a matcher that matches if the examined object matches ALL of the specified matchers. + For example: +
        assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        allOf

        +
        @SafeVarargs
        +public static <T> Matcher<T> allOf(Matcher<? super T>... matchers)
        +
        Creates a matcher that matches if the examined object matches ALL of the specified matchers. + For example: +
        assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/AnyOf.html b/docs/javadoc/2.1/org/hamcrest/core/AnyOf.html new file mode 100644 index 00000000..05504133 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/AnyOf.html @@ -0,0 +1,398 @@ + + + + + +AnyOf (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class AnyOf<T>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public class AnyOf<T>
    +extends BaseMatcher<T>
    +
    Calculates the logical disjunction of multiple matchers. Evaluation is shortcut, so + subsequent matchers are not called if an earlier matcher returns true.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AnyOf

        +
        public AnyOf(java.lang.Iterable<Matcher<? super T>> matchers)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matches

        +
        public boolean matches(java.lang.Object o)
        +
        Description copied from interface: Matcher
        +
        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.
        +
        +
        Specified by:
        +
        matches in interface Matcher<T>
        +
        Parameters:
        +
        o - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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.
        +
        +
        Specified by:
        +
        describeTo in interface SelfDescribing
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(java.lang.Iterable<Matcher<? super T>> matchers)
        +
        Creates a matcher that matches if the examined object matches ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        @SafeVarargs
        +public static <T> AnyOf<T> anyOf(Matcher<? super T>... matchers)
        +
        Creates a matcher that matches if the examined object matches ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
      • +
      + + + +
        +
      • +

        matches

        +
        protected boolean matches(java.lang.Object o,
        +                          boolean shortcut)
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description,
        +                       java.lang.String operator)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/CombinableMatcher.CombinableBothMatcher.html b/docs/javadoc/2.1/org/hamcrest/core/CombinableMatcher.CombinableBothMatcher.html new file mode 100644 index 00000000..19c1d114 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/CombinableMatcher.CombinableBothMatcher.html @@ -0,0 +1,273 @@ + + + + + +CombinableMatcher.CombinableBothMatcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class CombinableMatcher.CombinableBothMatcher<X>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.core.CombinableMatcher.CombinableBothMatcher<X>
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    CombinableMatcher<T>
    +
    +
    +
    +
    public static final class CombinableMatcher.CombinableBothMatcher<X>
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/CombinableMatcher.CombinableEitherMatcher.html b/docs/javadoc/2.1/org/hamcrest/core/CombinableMatcher.CombinableEitherMatcher.html new file mode 100644 index 00000000..5a746a14 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/CombinableMatcher.CombinableEitherMatcher.html @@ -0,0 +1,273 @@ + + + + + +CombinableMatcher.CombinableEitherMatcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class CombinableMatcher.CombinableEitherMatcher<X>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.core.CombinableMatcher.CombinableEitherMatcher<X>
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    CombinableMatcher<T>
    +
    +
    +
    +
    public static final class CombinableMatcher.CombinableEitherMatcher<X>
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/CombinableMatcher.html b/docs/javadoc/2.1/org/hamcrest/core/CombinableMatcher.html new file mode 100644 index 00000000..ced51fa5 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/CombinableMatcher.html @@ -0,0 +1,418 @@ + + + + + +CombinableMatcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class CombinableMatcher<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CombinableMatcher

        +
        public CombinableMatcher(Matcher<? super T> matcher)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        both

        +
        public static <LHS> CombinableMatcher.CombinableBothMatcher<LHS> both(Matcher<? super LHS> matcher)
        +
        Creates a matcher that matches when both of the specified matchers match the examined object. + For example: +
        assertThat("fab", both(containsString("a")).and(containsString("b")))
        +
      • +
      + + + +
        +
      • +

        either

        +
        public static <LHS> CombinableMatcher.CombinableEitherMatcher<LHS> either(Matcher<? super LHS> matcher)
        +
        Creates a matcher that matches when either of the specified matchers match the examined object. + For example: +
        assertThat("fan", either(containsString("a")).or(containsString("b")))
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/DescribedAs.html b/docs/javadoc/2.1/org/hamcrest/core/DescribedAs.html new file mode 100644 index 00000000..cdef4bab --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/DescribedAs.html @@ -0,0 +1,391 @@ + + + + + +DescribedAs (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class DescribedAs<T>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public class DescribedAs<T>
    +extends BaseMatcher<T>
    +
    Provides a custom description to another matcher.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DescribedAs

        +
        public DescribedAs(java.lang.String descriptionTemplate,
        +                   Matcher<T> matcher,
        +                   java.lang.Object[] values)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matches

        +
        public boolean matches(java.lang.Object o)
        +
        Description copied from interface: Matcher
        +
        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 - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatch

        +
        public void describeMismatch(java.lang.Object item,
        +                             Description description)
        +
        Description copied from interface: Matcher
        +
        Generate a description of why the matcher has not accepted the item. + The description will be part of a larger description of why a matching + failed, so it should be concise. + This method assumes that matches(item) is false, but + will not check this.
        +
        +
        Specified by:
        +
        describeMismatch in interface Matcher<T>
        +
        Overrides:
        +
        describeMismatch in class BaseMatcher<T>
        +
        Parameters:
        +
        item - The item that the Matcher has rejected.
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        describedAs

        +
        public static <T> Matcher<T> describedAs(java.lang.String description,
        +                                         Matcher<T> matcher,
        +                                         java.lang.Object... values)
        +
        Wraps an existing matcher, overriding its description with that specified. All other functions are + delegated to the decorated matcher, including its mismatch description. + For example: +
        describedAs("a big decimal equal to %0", equalTo(myBigDecimal), myBigDecimal.toPlainString())
        +
        +
        Parameters:
        +
        description - the new description for the wrapped matcher
        +
        matcher - the matcher to wrap
        +
        values - optional values to insert into the tokenised description
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/Every.html b/docs/javadoc/2.1/org/hamcrest/core/Every.html new file mode 100644 index 00000000..08be7362 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/Every.html @@ -0,0 +1,357 @@ + + + + + +Every (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class Every<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Every

        +
        public Every(Matcher<? super T> matcher)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.lang.Iterable<? extends T> collection,
        +                             Description mismatchDescription)
        +
        Description copied from class: TypeSafeDiagnosingMatcher
        +
        Subclasses should implement this. The item will already have been checked + for the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeDiagnosingMatcher<java.lang.Iterable<? extends T>>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        everyItem

        +
        public static <U> Matcher<java.lang.Iterable<? extends U>> everyItem(Matcher<U> itemMatcher)
        +
        Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields items that are all matched by the specified + itemMatcher. + For example: +
        assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))
        +
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to every item provided by the examined Iterable
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/Is.html b/docs/javadoc/2.1/org/hamcrest/core/Is.html new file mode 100644 index 00000000..600f3f20 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/Is.html @@ -0,0 +1,426 @@ + + + + + +Is (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class Is<T>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public class Is<T>
    +extends BaseMatcher<T>
    +
    Decorates another Matcher, retaining the behaviour but allowing tests + to be slightly more expressive. + + For example: assertThat(cheese, equalTo(smelly)) + vs. assertThat(cheese, is(equalTo(smelly)))
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      Is(Matcher<T> matcher) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voiddescribeMismatch(java.lang.Object item, + Description mismatchDescription) +
      Generate a description of why the matcher has not accepted the item.
      +
      voiddescribeTo(Description description) +
      Generates a description of the object.
      +
      static <T> Matcher<T>is(Matcher<T> matcher) +
      Decorates another Matcher, retaining its behaviour, but allowing tests + to be slightly more expressive.
      +
      static <T> Matcher<T>is(T value) +
      A shortcut to the frequently used is(equalTo(x)).
      +
      static <T> Matcher<T>isA(java.lang.Class<?> type) +
      A shortcut to the frequently used is(instanceOf(SomeClass.class)).
      +
      booleanmatches(java.lang.Object arg) +
      Evaluates the matcher for argument item.
      +
      + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Is

        +
        public Is(Matcher<T> matcher)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matches

        +
        public boolean matches(java.lang.Object arg)
        +
        Description copied from interface: Matcher
        +
        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:
        +
        arg - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatch

        +
        public void describeMismatch(java.lang.Object item,
        +                             Description mismatchDescription)
        +
        Description copied from interface: Matcher
        +
        Generate a description of why the matcher has not accepted the item. + The description will be part of a larger description of why a matching + failed, so it should be concise. + This method assumes that matches(item) is false, but + will not check this.
        +
        +
        Specified by:
        +
        describeMismatch in interface Matcher<T>
        +
        Overrides:
        +
        describeMismatch in class BaseMatcher<T>
        +
        Parameters:
        +
        item - The item that the Matcher has rejected.
        +
        mismatchDescription - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        is

        +
        public static <T> Matcher<T> is(Matcher<T> matcher)
        +
        Decorates another Matcher, retaining its behaviour, but allowing tests + to be slightly more expressive. + For example: +
        assertThat(cheese, is(equalTo(smelly)))
        + instead of: +
        assertThat(cheese, equalTo(smelly))
        +
      • +
      + + + + + +
        +
      • +

        is

        +
        public static <T> Matcher<T> is(T value)
        +
        A shortcut to the frequently used is(equalTo(x)). + For example: +
        assertThat(cheese, is(smelly))
        + instead of: +
        assertThat(cheese, is(equalTo(smelly)))
        +
      • +
      + + + +
        +
      • +

        isA

        +
        public static <T> Matcher<T> isA(java.lang.Class<?> type)
        +
        A shortcut to the frequently used is(instanceOf(SomeClass.class)). + For example: +
        assertThat(cheese, isA(Cheddar.class))
        + instead of: +
        assertThat(cheese, is(instanceOf(Cheddar.class)))
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/IsAnything.html b/docs/javadoc/2.1/org/hamcrest/core/IsAnything.html new file mode 100644 index 00000000..55e5dda0 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/IsAnything.html @@ -0,0 +1,376 @@ + + + + + +IsAnything (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class IsAnything<T>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public class IsAnything<T>
    +extends BaseMatcher<T>
    +
    A matcher that always returns true.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsAnything

        +
        public IsAnything()
        +
      • +
      + + + +
        +
      • +

        IsAnything

        +
        public IsAnything(java.lang.String message)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matches

        +
        public boolean matches(java.lang.Object o)
        +
        Description copied from interface: Matcher
        +
        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 - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        anything

        +
        public static Matcher<java.lang.Object> anything()
        +
        Creates a matcher that always matches, regardless of the examined object.
        +
      • +
      + + + +
        +
      • +

        anything

        +
        public static Matcher<java.lang.Object> anything(java.lang.String description)
        +
        Creates a matcher that always matches, regardless of the examined object, but describes + itself with the specified String.
        +
        +
        Parameters:
        +
        description - a meaningful String used when describing itself
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/IsCollectionContaining.html b/docs/javadoc/2.1/org/hamcrest/core/IsCollectionContaining.html new file mode 100644 index 00000000..47f15972 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/IsCollectionContaining.html @@ -0,0 +1,460 @@ + + + + + +IsCollectionContaining (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class IsCollectionContaining<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsCollectionContaining

        +
        public IsCollectionContaining(Matcher<? super T> elementMatcher)
        +
        Deprecated. 
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        protected boolean matchesSafely(java.lang.Iterable<? super T> collection,
        +                                Description mismatchDescription)
        +
        Deprecated. 
        +
        Description copied from class: TypeSafeDiagnosingMatcher
        +
        Subclasses should implement this. The item will already have been checked + for the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeDiagnosingMatcher<java.lang.Iterable<? super T>>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Deprecated. 
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        hasItem

        +
        public static <T> Matcher<java.lang.Iterable<? super T>> hasItem(Matcher<? super T> itemMatcher)
        +
        Deprecated. As of version 2.1, use IsIterableContaining.hasItem(Matcher).
        +
        Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is matched by the specified + itemMatcher. Whilst matching, the traversal of the examined Iterable + will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar"), hasItem(startsWith("ba")))
        +
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to items provided by the examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        hasItem

        +
        public static <T> Matcher<java.lang.Iterable<? super T>> hasItem(T item)
        +
        Deprecated. As of version 2.1, use IsIterableContaining.hasItem(Object).
        +
        Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is equal to the specified + item. Whilst matching, the traversal of the examined Iterable + will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar"), hasItem("bar"))
        +
        +
        Parameters:
        +
        item - the item to compare against the items provided by the examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        hasItems

        +
        @SafeVarargs
        +public static <T> Matcher<java.lang.Iterable<T>> hasItems(Matcher<? super T>... itemMatchers)
        +
        Deprecated. As of version 2.1, use IsIterableContaining.hasItems(Matcher[])}.
        +
        Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is matched by the corresponding + matcher from the specified itemMatchers. Whilst matching, each traversal of + the examined Iterable will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar", "baz"), hasItems(endsWith("z"), endsWith("o")))
        +
        +
        Parameters:
        +
        itemMatchers - the matchers to apply to items provided by the examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        hasItems

        +
        @SafeVarargs
        +public static <T> Matcher<java.lang.Iterable<T>> hasItems(T... items)
        +
        Deprecated. As of version 2.1, use IsIterableContaining.hasItems(Object[])}.
        +
        Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is equal to the corresponding + item from the specified items. Whilst matching, each traversal of the + examined Iterable will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar", "baz"), hasItems("baz", "foo"))
        +
        +
        Parameters:
        +
        items - the items to compare against the items provided by the examined Iterable
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/IsEqual.html b/docs/javadoc/2.1/org/hamcrest/core/IsEqual.html new file mode 100644 index 00000000..c00181ac --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/IsEqual.html @@ -0,0 +1,385 @@ + + + + + +IsEqual (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class IsEqual<T>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public class IsEqual<T>
    +extends BaseMatcher<T>
    +
    Is the value equal to another value, as tested by the + Object.equals(java.lang.Object) invokedMethod?
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      IsEqual(T equalArg) 
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + + + +
        +
      • +

        IsEqual

        +
        public IsEqual(T equalArg)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matches

        +
        public boolean matches(java.lang.Object actualValue)
        +
        Description copied from interface: Matcher
        +
        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:
        +
        actualValue - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + + + +
        +
      • +

        equalTo

        +
        public static <T> Matcher<T> equalTo(T operand)
        +
        Creates a matcher that matches when the examined object is logically equal to the specified + operand, as determined by calling the Object.equals(java.lang.Object) method on + the examined object. + +

        If the specified operand is null then the created matcher will only match if + the examined object's equals method returns true when passed a + null (which would be a violation of the equals contract), unless the + examined object itself is null, in which case the matcher will return a positive + match.

        + +

        The created matcher provides a special behaviour when examining Arrays, whereby + it will match if both the operand and the examined object are arrays of the same length and + contain items that are equal to each other (according to the above rules) in the same + indexes.

        + For example: +
        + assertThat("foo", equalTo("foo"));
        + assertThat(new String[] {"foo", "bar"}, equalTo(new String[] {"foo", "bar"}));
        + 
        +
      • +
      + + + +
        +
      • +

        equalToObject

        +
        public static Matcher<java.lang.Object> equalToObject(java.lang.Object operand)
        +
        Creates an IsEqual matcher that does not enforce the values being + compared to be of the same static type.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/IsInstanceOf.html b/docs/javadoc/2.1/org/hamcrest/core/IsInstanceOf.html new file mode 100644 index 00000000..86b91c4f --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/IsInstanceOf.html @@ -0,0 +1,386 @@ + + + + + +IsInstanceOf (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class IsInstanceOf

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.Object>, SelfDescribing
    +
    +
    +
    +
    public class IsInstanceOf
    +extends DiagnosingMatcher<java.lang.Object>
    +
    Tests whether the value is an instance of a class. + Classes of basic types will be converted to the relevant "Object" classes
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      IsInstanceOf(java.lang.Class<?> expectedClass) +
      Creates a new instance of IsInstanceOf
      +
      +
    • +
    + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsInstanceOf

        +
        public IsInstanceOf(java.lang.Class<?> expectedClass)
        +
        Creates a new instance of IsInstanceOf
        +
        +
        Parameters:
        +
        expectedClass - The predicate evaluates to true for instances of this class + or one of its subclasses.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        instanceOf

        +
        public static <T> Matcher<T> instanceOf(java.lang.Class<?> type)
        +
        Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object. + +

        The created matcher assumes no relationship between specified type and the examined object.

        + For example: +
        assertThat(new Canoe(), instanceOf(Paddlable.class));
        +
      • +
      + + + +
        +
      • +

        any

        +
        public static <T> Matcher<T> any(java.lang.Class<T> type)
        +
        Creates a matcher that matches when the examined object is an instance of the specified type, + as determined by calling the Class.isInstance(Object) method on that type, passing the + the examined object. + +

        The created matcher forces a relationship between specified type and the examined object, and should be + used when it is necessary to make generics conform, for example in the JMock clause + with(any(Thing.class))

        + For example: +
        assertThat(new Canoe(), instanceOf(Canoe.class));
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/IsIterableContaining.html b/docs/javadoc/2.1/org/hamcrest/core/IsIterableContaining.html new file mode 100644 index 00000000..b4376905 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/IsIterableContaining.html @@ -0,0 +1,445 @@ + + + + + +IsIterableContaining (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class IsIterableContaining<T>

+
+
+ +
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voiddescribeTo(Description description) +
      Generates a description of the object.
      +
      static <T> Matcher<java.lang.Iterable<? super T>>hasItem(Matcher<? super T> itemMatcher) +
      Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is matched by the specified + itemMatcher.
      +
      static <T> Matcher<java.lang.Iterable<? super T>>hasItem(T item) +
      Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is equal to the specified + item.
      +
      static <T> Matcher<java.lang.Iterable<T>>hasItems(Matcher<? super T>... itemMatchers) +
      Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is matched by the corresponding + matcher from the specified itemMatchers.
      +
      static <T> Matcher<java.lang.Iterable<T>>hasItems(T... items) +
      Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is equal to the corresponding + item from the specified items.
      +
      protected booleanmatchesSafely(java.lang.Iterable<? super T> collection, + Description mismatchDescription) +
      Subclasses should implement this.
      +
      + + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsIterableContaining

        +
        public IsIterableContaining(Matcher<? super T> elementMatcher)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        protected boolean matchesSafely(java.lang.Iterable<? super T> collection,
        +                                Description mismatchDescription)
        +
        Description copied from class: TypeSafeDiagnosingMatcher
        +
        Subclasses should implement this. The item will already have been checked + for the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeDiagnosingMatcher<java.lang.Iterable<? super T>>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        hasItem

        +
        public static <T> Matcher<java.lang.Iterable<? super T>> hasItem(Matcher<? super T> itemMatcher)
        +
        Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is matched by the specified + itemMatcher. Whilst matching, the traversal of the examined Iterable + will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar"), hasItem(startsWith("ba")))
        +
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to items provided by the examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        hasItem

        +
        public static <T> Matcher<java.lang.Iterable<? super T>> hasItem(T item)
        +
        Creates a matcher for Iterables that only matches when a single pass over the + examined Iterable yields at least one item that is equal to the specified + item. Whilst matching, the traversal of the examined Iterable + will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar"), hasItem("bar"))
        +
        +
        Parameters:
        +
        item - the item to compare against the items provided by the examined Iterable
        +
        +
      • +
      + + + +
        +
      • +

        hasItems

        +
        @SafeVarargs
        +public static <T> Matcher<java.lang.Iterable<T>> hasItems(Matcher<? super T>... itemMatchers)
        +
        Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is matched by the corresponding + matcher from the specified itemMatchers. Whilst matching, each traversal of + the examined Iterable will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar", "baz"), hasItems(endsWith("z"), endsWith("o")))
        +
        +
        Parameters:
        +
        itemMatchers - the matchers to apply to items provided by the examined Iterable
        +
        +
      • +
      + + + + + +
        +
      • +

        hasItems

        +
        @SafeVarargs
        +public static <T> Matcher<java.lang.Iterable<T>> hasItems(T... items)
        +
        Creates a matcher for Iterables that matches when consecutive passes over the + examined Iterable yield at least one item that is equal to the corresponding + item from the specified items. Whilst matching, each traversal of the + examined Iterable will stop as soon as a matching item is found. + For example: +
        assertThat(Arrays.asList("foo", "bar", "baz"), hasItems("baz", "foo"))
        +
        +
        Parameters:
        +
        items - the items to compare against the items provided by the examined Iterable
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/IsNot.html b/docs/javadoc/2.1/org/hamcrest/core/IsNot.html new file mode 100644 index 00000000..b0e3f0eb --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/IsNot.html @@ -0,0 +1,376 @@ + + + + + +IsNot (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class IsNot<T>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public class IsNot<T>
    +extends BaseMatcher<T>
    +
    Calculates the logical negation of a matcher.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsNot

        +
        public IsNot(Matcher<T> matcher)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matches

        +
        public boolean matches(java.lang.Object arg)
        +
        Description copied from interface: Matcher
        +
        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:
        +
        arg - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        not

        +
        public static <T> Matcher<T> not(Matcher<T> matcher)
        +
        Creates a matcher that wraps an existing matcher, but inverts the logic by which + it will match. + For example: +
        assertThat(cheese, is(not(equalTo(smelly))))
        +
        +
        Parameters:
        +
        matcher - the matcher whose sense should be inverted
        +
        +
      • +
      + + + + + +
        +
      • +

        not

        +
        public static <T> Matcher<T> not(T value)
        +
        A shortcut to the frequently used not(equalTo(x)). + For example: +
        assertThat(cheese, is(not(smelly)))
        + instead of: +
        assertThat(cheese, is(not(equalTo(smelly))))
        +
        +
        Parameters:
        +
        value - the value that any examined object should not equal
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/IsNull.html b/docs/javadoc/2.1/org/hamcrest/core/IsNull.html new file mode 100644 index 00000000..f332959d --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/IsNull.html @@ -0,0 +1,412 @@ + + + + + +IsNull (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class IsNull<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsNull

        +
        public IsNull()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matches

        +
        public boolean matches(java.lang.Object o)
        +
        Description copied from interface: Matcher
        +
        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 - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        nullValue

        +
        public static Matcher<java.lang.Object> nullValue()
        +
        Creates a matcher that matches if examined object is null. + For example: +
        assertThat(cheese, is(nullValue())
        +
      • +
      + + + +
        +
      • +

        notNullValue

        +
        public static Matcher<java.lang.Object> notNullValue()
        +
        A shortcut to the frequently used not(nullValue()). + For example: +
        assertThat(cheese, is(notNullValue()))
        + instead of: +
        assertThat(cheese, is(not(nullValue())))
        +
      • +
      + + + +
        +
      • +

        nullValue

        +
        public static <T> Matcher<T> nullValue(java.lang.Class<T> type)
        +
        Creates a matcher that matches if examined object is null. Accepts a + single dummy argument to facilitate type inference. + For example: +
        assertThat(cheese, is(nullValue(Cheese.class))
        +
        +
        Parameters:
        +
        type - dummy parameter used to infer the generic type of the returned matcher
        +
        +
      • +
      + + + +
        +
      • +

        notNullValue

        +
        public static <T> Matcher<T> notNullValue(java.lang.Class<T> type)
        +
        A shortcut to the frequently used not(nullValue(X.class)). Accepts a + single dummy argument to facilitate type inference.. + For example: +
        assertThat(cheese, is(notNullValue(X.class)))
        + instead of: +
        assertThat(cheese, is(not(nullValue(X.class))))
        +
        +
        Parameters:
        +
        type - dummy parameter used to infer the generic type of the returned matcher
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/IsSame.html b/docs/javadoc/2.1/org/hamcrest/core/IsSame.html new file mode 100644 index 00000000..e0d2c3cf --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/IsSame.html @@ -0,0 +1,376 @@ + + + + + +IsSame (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class IsSame<T>

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public class IsSame<T>
    +extends BaseMatcher<T>
    +
    Is the value the same object as another value?
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + + + +
        +
      • +

        IsSame

        +
        public IsSame(T object)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matches

        +
        public boolean matches(java.lang.Object arg)
        +
        Description copied from interface: Matcher
        +
        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:
        +
        arg - the object against which the matcher is evaluated.
        +
        Returns:
        +
        true if item matches, otherwise false.
        +
        See Also:
        +
        BaseMatcher
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + + + +
        +
      • +

        sameInstance

        +
        public static <T> Matcher<T> sameInstance(T target)
        +
        Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
        +
        +
        Parameters:
        +
        target - the target instance against which others should be assessed
        +
        +
      • +
      + + + + + +
        +
      • +

        theInstance

        +
        public static <T> Matcher<T> theInstance(T target)
        +
        Creates a matcher that matches only when the examined object is the same instance as + the specified target object.
        +
        +
        Parameters:
        +
        target - the target instance against which others should be assessed
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/StringContains.html b/docs/javadoc/2.1/org/hamcrest/core/StringContains.html new file mode 100644 index 00000000..b82ef677 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/StringContains.html @@ -0,0 +1,379 @@ + + + + + +StringContains (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class StringContains

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.String>, SelfDescribing
    +
    +
    +
    +
    public class StringContains
    +extends SubstringMatcher
    +
    Tests if the argument is a string that contains a specific substring.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StringContains

        +
        public StringContains(boolean ignoringCase,
        +                      java.lang.String substring)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        containsString

        +
        public static Matcher<java.lang.String> containsString(java.lang.String substring)
        +
        Creates a matcher that matches if the examined String contains the specified + String anywhere. + For example: +
        assertThat("myStringOfNote", containsString("ring"))
        +
        +
        Parameters:
        +
        substring - the substring that the returned matcher will expect to find within any examined string
        +
        +
      • +
      + + + +
        +
      • +

        containsStringIgnoringCase

        +
        public static Matcher<java.lang.String> containsStringIgnoringCase(java.lang.String substring)
        +
        Creates a matcher that matches if the examined String contains the specified + String anywhere, ignoring case. + For example: +
        assertThat("myStringOfNote", containsStringIgnoringCase("Ring"))
        +
        +
        Parameters:
        +
        substring - the substring that the returned matcher will expect to find within any examined string
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/StringEndsWith.html b/docs/javadoc/2.1/org/hamcrest/core/StringEndsWith.html new file mode 100644 index 00000000..f652125c --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/StringEndsWith.html @@ -0,0 +1,379 @@ + + + + + +StringEndsWith (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class StringEndsWith

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.String>, SelfDescribing
    +
    +
    +
    +
    public class StringEndsWith
    +extends SubstringMatcher
    +
    Tests if the argument is a string that ends with a specific substring.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StringEndsWith

        +
        public StringEndsWith(boolean ignoringCase,
        +                      java.lang.String substring)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        endsWith

        +
        public static Matcher<java.lang.String> endsWith(java.lang.String suffix)
        +
        Creates a matcher that matches if the examined String ends with the specified + String. + For example: +
        assertThat("myStringOfNote", endsWith("Note"))
        +
        +
        Parameters:
        +
        suffix - the substring that the returned matcher will expect at the end of any examined string
        +
        +
      • +
      + + + +
        +
      • +

        endsWithIgnoringCase

        +
        public static Matcher<java.lang.String> endsWithIgnoringCase(java.lang.String suffix)
        +
        Creates a matcher that matches if the examined String ends with the specified + String, ignoring case. + For example: +
        assertThat("myStringOfNote", endsWithIgnoringCase("note"))
        +
        +
        Parameters:
        +
        suffix - the substring that the returned matcher will expect at the end of any examined string
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/StringRegularExpression.html b/docs/javadoc/2.1/org/hamcrest/core/StringRegularExpression.html new file mode 100644 index 00000000..9b5b6f1f --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/StringRegularExpression.html @@ -0,0 +1,385 @@ + + + + + +StringRegularExpression (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class StringRegularExpression

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StringRegularExpression

        +
        protected StringRegularExpression(java.util.regex.Pattern pattern)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        matchesSafely

        +
        protected boolean matchesSafely(java.lang.String actual,
        +                                Description mismatchDescription)
        +
        Description copied from class: TypeSafeDiagnosingMatcher
        +
        Subclasses should implement this. The item will already have been checked + for the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeDiagnosingMatcher<java.lang.String>
        +
        +
      • +
      + + + +
        +
      • +

        matchesRegex

        +
        public static Matcher<java.lang.String> matchesRegex(java.util.regex.Pattern pattern)
        +
        Creates a matcher that checks if the examined string matches a specified Pattern. + +
        + assertThat("abc", matchesRegex(Pattern.compile("ˆ[a-z]$"));
        + 
        +
        +
        Parameters:
        +
        pattern - the pattern to be used.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        matchesRegex

        +
        public static Matcher<java.lang.String> matchesRegex(java.lang.String regex)
        +
        Creates a matcher that checks if the examined string matches a specified regex. + +
        + assertThat("abc", matchesRegex("ˆ[a-z]+$"));
        + 
        +
        +
        Parameters:
        +
        regex - The regex to be used for the validation.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/StringStartsWith.html b/docs/javadoc/2.1/org/hamcrest/core/StringStartsWith.html new file mode 100644 index 00000000..fd0207c5 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/StringStartsWith.html @@ -0,0 +1,385 @@ + + + + + +StringStartsWith (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class StringStartsWith

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.String>, SelfDescribing
    +
    +
    +
    +
    public class StringStartsWith
    +extends SubstringMatcher
    +
    Tests if the argument is a string that starts with a specific substring.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StringStartsWith

        +
        public StringStartsWith(boolean ignoringCase,
        +                        java.lang.String substring)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        startsWith

        +
        public static Matcher<java.lang.String> startsWith(java.lang.String prefix)
        +

        + Creates a matcher that matches if the examined String starts with the specified + String. +

        + For example: +
        assertThat("myStringOfNote", startsWith("my"))
        +
        +
        Parameters:
        +
        prefix - the substring that the returned matcher will expect at the start of any examined string
        +
        +
      • +
      + + + +
        +
      • +

        startsWithIgnoringCase

        +
        public static Matcher<java.lang.String> startsWithIgnoringCase(java.lang.String prefix)
        +

        + Creates a matcher that matches if the examined String starts with the specified + String, ignoring case +

        + For example: +
        assertThat("myStringOfNote", startsWithIgnoringCase("My"))
        +
        +
        Parameters:
        +
        prefix - the substring that the returned matcher will expect at the start of any examined string
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/SubstringMatcher.html b/docs/javadoc/2.1/org/hamcrest/core/SubstringMatcher.html new file mode 100644 index 00000000..022ca4cd --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/SubstringMatcher.html @@ -0,0 +1,425 @@ + + + + + +SubstringMatcher (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.core
+

Class SubstringMatcher

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        substring

        +
        protected final java.lang.String substring
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SubstringMatcher

        +
        protected SubstringMatcher(java.lang.String relationship,
        +                           boolean ignoringCase,
        +                           java.lang.String substring)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.lang.String item)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.lang.String>
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(java.lang.String item,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<java.lang.String>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        converted

        +
        protected java.lang.String converted(java.lang.String arg)
        +
      • +
      + + + +
        +
      • +

        evalSubstringOf

        +
        protected abstract boolean evalSubstringOf(java.lang.String string)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/package-frame.html b/docs/javadoc/2.1/org/hamcrest/core/package-frame.html new file mode 100644 index 00000000..10533720 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/package-frame.html @@ -0,0 +1,40 @@ + + + + + +org.hamcrest.core (Hamcrest 2.1 API) + + + + + +

org.hamcrest.core

+ + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/package-summary.html b/docs/javadoc/2.1/org/hamcrest/core/package-summary.html new file mode 100644 index 00000000..0cecbd40 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/package-summary.html @@ -0,0 +1,259 @@ + + + + + +org.hamcrest.core (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Package org.hamcrest.core

+
+
Fundamental matchers of objects and values, and composite matchers.
+
+

See: Description

+
+
+ + + + +

Package org.hamcrest.core Description

+

Fundamental matchers of objects and values, and composite matchers.

+
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/core/package-tree.html b/docs/javadoc/2.1/org/hamcrest/core/package-tree.html new file mode 100644 index 00000000..84b92375 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/core/package-tree.html @@ -0,0 +1,174 @@ + + + + + +org.hamcrest.core Class Hierarchy (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.core

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/internal/ArrayIterator.html b/docs/javadoc/2.1/org/hamcrest/internal/ArrayIterator.html new file mode 100644 index 00000000..43839f5d --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/internal/ArrayIterator.html @@ -0,0 +1,319 @@ + + + + + +ArrayIterator (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.internal
+

Class ArrayIterator

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.internal.ArrayIterator
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.util.Iterator<java.lang.Object>
    +
    +
    +
    +
    public class ArrayIterator
    +extends java.lang.Object
    +implements java.util.Iterator<java.lang.Object>
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      ArrayIterator(java.lang.Object array) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      booleanhasNext() 
      java.lang.Objectnext() 
      voidremove() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
        +
      • + + +

        Methods inherited from interface java.util.Iterator

        +forEachRemaining
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ArrayIterator

        +
        public ArrayIterator(java.lang.Object array)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        hasNext

        +
        public boolean hasNext()
        +
        +
        Specified by:
        +
        hasNext in interface java.util.Iterator<java.lang.Object>
        +
        +
      • +
      + + + +
        +
      • +

        next

        +
        public java.lang.Object next()
        +
        +
        Specified by:
        +
        next in interface java.util.Iterator<java.lang.Object>
        +
        +
      • +
      + + + +
        +
      • +

        remove

        +
        public void remove()
        +
        +
        Specified by:
        +
        remove in interface java.util.Iterator<java.lang.Object>
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/internal/NullSafety.html b/docs/javadoc/2.1/org/hamcrest/internal/NullSafety.html new file mode 100644 index 00000000..7a1bd85b --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/internal/NullSafety.html @@ -0,0 +1,269 @@ + + + + + +NullSafety (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.internal
+

Class NullSafety

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.internal.NullSafety
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class NullSafety
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      NullSafety() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static <E> java.util.List<Matcher<? super E>>nullSafe(Matcher<? super E>[] itemMatchers) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NullSafety

        +
        public NullSafety()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        nullSafe

        +
        public static <E> java.util.List<Matcher<? super E>> nullSafe(Matcher<? super E>[] itemMatchers)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/internal/ReflectiveTypeFinder.html b/docs/javadoc/2.1/org/hamcrest/internal/ReflectiveTypeFinder.html new file mode 100644 index 00000000..edfc1bea --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/internal/ReflectiveTypeFinder.html @@ -0,0 +1,273 @@ + + + + + +ReflectiveTypeFinder (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.internal
+

Class ReflectiveTypeFinder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.internal.ReflectiveTypeFinder
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class ReflectiveTypeFinder
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      ReflectiveTypeFinder(java.lang.String methodName, + int expectedNumberOfParameters, + int typedParameter) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.Class<?>findExpectedType(java.lang.Class<?> fromClass) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ReflectiveTypeFinder

        +
        public ReflectiveTypeFinder(java.lang.String methodName,
        +                            int expectedNumberOfParameters,
        +                            int typedParameter)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        findExpectedType

        +
        public java.lang.Class<?> findExpectedType(java.lang.Class<?> fromClass)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/internal/SelfDescribingValue.html b/docs/javadoc/2.1/org/hamcrest/internal/SelfDescribingValue.html new file mode 100644 index 00000000..0e54cc64 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/internal/SelfDescribingValue.html @@ -0,0 +1,288 @@ + + + + + +SelfDescribingValue (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.internal
+

Class SelfDescribingValue<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.internal.SelfDescribingValue<T>
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    SelfDescribing
    +
    +
    +
    +
    public class SelfDescribingValue<T>
    +extends java.lang.Object
    +implements SelfDescribing
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      SelfDescribingValue(T value) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voiddescribeTo(Description description) +
      Generates a description of the object.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + + + +
        +
      • +

        SelfDescribingValue

        +
        public SelfDescribingValue(T value)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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.
        +
        +
        Specified by:
        +
        describeTo in interface SelfDescribing
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/internal/SelfDescribingValueIterator.html b/docs/javadoc/2.1/org/hamcrest/internal/SelfDescribingValueIterator.html new file mode 100644 index 00000000..597ebe2c --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/internal/SelfDescribingValueIterator.html @@ -0,0 +1,319 @@ + + + + + +SelfDescribingValueIterator (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.internal
+

Class SelfDescribingValueIterator<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.internal.SelfDescribingValueIterator<T>
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.util.Iterator<SelfDescribing>
    +
    +
    +
    +
    public class SelfDescribingValueIterator<T>
    +extends java.lang.Object
    +implements java.util.Iterator<SelfDescribing>
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      booleanhasNext() 
      SelfDescribingnext() 
      voidremove() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
        +
      • + + +

        Methods inherited from interface java.util.Iterator

        +forEachRemaining
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SelfDescribingValueIterator

        +
        public SelfDescribingValueIterator(java.util.Iterator<T> values)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        hasNext

        +
        public boolean hasNext()
        +
        +
        Specified by:
        +
        hasNext in interface java.util.Iterator<SelfDescribing>
        +
        +
      • +
      + + + + + + + +
        +
      • +

        remove

        +
        public void remove()
        +
        +
        Specified by:
        +
        remove in interface java.util.Iterator<SelfDescribing>
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/internal/package-frame.html b/docs/javadoc/2.1/org/hamcrest/internal/package-frame.html new file mode 100644 index 00000000..19e4b4bf --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/internal/package-frame.html @@ -0,0 +1,24 @@ + + + + + +org.hamcrest.internal (Hamcrest 2.1 API) + + + + + +

org.hamcrest.internal

+ + + diff --git a/docs/javadoc/2.1/org/hamcrest/internal/package-summary.html b/docs/javadoc/2.1/org/hamcrest/internal/package-summary.html new file mode 100644 index 00000000..268b1d43 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/internal/package-summary.html @@ -0,0 +1,156 @@ + + + + + +org.hamcrest.internal (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Package org.hamcrest.internal

+
+
+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/internal/package-tree.html b/docs/javadoc/2.1/org/hamcrest/internal/package-tree.html new file mode 100644 index 00000000..00cedc32 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/internal/package-tree.html @@ -0,0 +1,139 @@ + + + + + +org.hamcrest.internal Class Hierarchy (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.internal

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/io/FileMatchers.FileStatus.html b/docs/javadoc/2.1/org/hamcrest/io/FileMatchers.FileStatus.html new file mode 100644 index 00000000..bb31eb70 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/io/FileMatchers.FileStatus.html @@ -0,0 +1,223 @@ + + + + + +FileMatchers.FileStatus (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.io
+

Interface FileMatchers.FileStatus

+
+
+
+
    +
  • +
    +
    Enclosing class:
    +
    FileMatchers
    +
    +
    +
    +
    public static interface FileMatchers.FileStatus
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        check

        +
        boolean check(java.io.File actual)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/io/FileMatchers.html b/docs/javadoc/2.1/org/hamcrest/io/FileMatchers.html new file mode 100644 index 00000000..71c7ba19 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/io/FileMatchers.html @@ -0,0 +1,493 @@ + + + + + +FileMatchers (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.io
+

Class FileMatchers

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.io.FileMatchers
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public final class FileMatchers
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FileMatchers

        +
        public FileMatchers()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        anExistingDirectory

        +
        public static Matcher<java.io.File> anExistingDirectory()
        +
      • +
      + + + +
        +
      • +

        anExistingFileOrDirectory

        +
        public static Matcher<java.io.File> anExistingFileOrDirectory()
        +
      • +
      + + + +
        +
      • +

        anExistingFile

        +
        public static Matcher<java.io.File> anExistingFile()
        +
      • +
      + + + +
        +
      • +

        aReadableFile

        +
        public static Matcher<java.io.File> aReadableFile()
        +
      • +
      + + + +
        +
      • +

        aWritableFile

        +
        public static Matcher<java.io.File> aWritableFile()
        +
      • +
      + + + +
        +
      • +

        aFileWithSize

        +
        public static Matcher<java.io.File> aFileWithSize(long size)
        +
      • +
      + + + +
        +
      • +

        aFileWithSize

        +
        public static Matcher<java.io.File> aFileWithSize(Matcher<java.lang.Long> expected)
        +
      • +
      + + + +
        +
      • +

        aFileNamed

        +
        public static Matcher<java.io.File> aFileNamed(Matcher<java.lang.String> expected)
        +
      • +
      + + + +
        +
      • +

        aFileWithCanonicalPath

        +
        public static Matcher<java.io.File> aFileWithCanonicalPath(Matcher<java.lang.String> expected)
        +
      • +
      + + + +
        +
      • +

        aFileWithAbsolutePath

        +
        public static Matcher<java.io.File> aFileWithAbsolutePath(Matcher<java.lang.String> expected)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/io/package-frame.html b/docs/javadoc/2.1/org/hamcrest/io/package-frame.html new file mode 100644 index 00000000..a2504313 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/io/package-frame.html @@ -0,0 +1,24 @@ + + + + + +org.hamcrest.io (Hamcrest 2.1 API) + + + + + +

org.hamcrest.io

+
+

Interfaces

+ +

Classes

+ +
+ + diff --git a/docs/javadoc/2.1/org/hamcrest/io/package-summary.html b/docs/javadoc/2.1/org/hamcrest/io/package-summary.html new file mode 100644 index 00000000..aff3ef38 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/io/package-summary.html @@ -0,0 +1,155 @@ + + + + + +org.hamcrest.io (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Package org.hamcrest.io

+
+
+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/io/package-tree.html b/docs/javadoc/2.1/org/hamcrest/io/package-tree.html new file mode 100644 index 00000000..c83081a6 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/io/package-tree.html @@ -0,0 +1,139 @@ + + + + + +org.hamcrest.io Class Hierarchy (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.io

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/number/BigDecimalCloseTo.html b/docs/javadoc/2.1/org/hamcrest/number/BigDecimalCloseTo.html new file mode 100644 index 00000000..148fbca7 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/number/BigDecimalCloseTo.html @@ -0,0 +1,383 @@ + + + + + +BigDecimalCloseTo (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.number
+

Class BigDecimalCloseTo

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BigDecimalCloseTo

        +
        public BigDecimalCloseTo(java.math.BigDecimal value,
        +                         java.math.BigDecimal error)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.math.BigDecimal item)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.math.BigDecimal>
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(java.math.BigDecimal item,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<java.math.BigDecimal>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        closeTo

        +
        public static Matcher<java.math.BigDecimal> closeTo(java.math.BigDecimal operand,
        +                                                    java.math.BigDecimal error)
        +
        Creates a matcher of BigDecimals that matches when an examined BigDecimal is equal + to the specified operand, within a range of +/- error. The comparison for equality + is done by BigDecimals BigDecimal.compareTo(java.math.BigDecimal) method. + For example: +
        assertThat(new BigDecimal("1.03"), is(closeTo(new BigDecimal("1.0"), new BigDecimal("0.03"))))
        +
        +
        Parameters:
        +
        operand - the expected value of matching BigDecimals
        +
        error - the delta (+/-) within which matches will be allowed
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/number/IsCloseTo.html b/docs/javadoc/2.1/org/hamcrest/number/IsCloseTo.html new file mode 100644 index 00000000..d7191406 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/number/IsCloseTo.html @@ -0,0 +1,384 @@ + + + + + +IsCloseTo (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.number
+

Class IsCloseTo

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.Double>, SelfDescribing
    +
    +
    +
    +
    public class IsCloseTo
    +extends TypeSafeMatcher<java.lang.Double>
    +
    Is the value a number equal to a value within some range of + acceptable error?
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsCloseTo

        +
        public IsCloseTo(double value,
        +                 double error)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.lang.Double item)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.lang.Double>
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(java.lang.Double item,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<java.lang.Double>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        closeTo

        +
        public static Matcher<java.lang.Double> closeTo(double operand,
        +                                                double error)
        +
        Creates a matcher of Doubles that matches when an examined double is equal + to the specified operand, within a range of +/- error. + For example: +
        assertThat(1.03, is(closeTo(1.0, 0.03)))
        +
        +
        Parameters:
        +
        operand - the expected value of matching doubles
        +
        error - the delta (+/-) within which matches will be allowed
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/number/IsNaN.html b/docs/javadoc/2.1/org/hamcrest/number/IsNaN.html new file mode 100644 index 00000000..c564e379 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/number/IsNaN.html @@ -0,0 +1,338 @@ + + + + + +IsNaN (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.number
+

Class IsNaN

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.Double>, SelfDescribing
    +
    +
    +
    +
    public final class IsNaN
    +extends TypeSafeMatcher<java.lang.Double>
    +
    Is the value a number actually not a number (NaN)?
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.lang.Double item)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.lang.Double>
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(java.lang.Double item,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<java.lang.Double>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        notANumber

        +
        public static Matcher<java.lang.Double> notANumber()
        +
        Creates a matcher of Doubles that matches when an examined double is not a number. + For example: +
        assertThat(Double.NaN, is(notANumber()))
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/number/OrderingComparison.html b/docs/javadoc/2.1/org/hamcrest/number/OrderingComparison.html new file mode 100644 index 00000000..b8077df2 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/number/OrderingComparison.html @@ -0,0 +1,366 @@ + + + + + +OrderingComparison (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.number
+

Class OrderingComparison

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.hamcrest.number.OrderingComparison
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class OrderingComparison
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static <T extends java.lang.Comparable<T>>
      Matcher<T>
      comparesEqualTo(T value) +
      Creates a matcher of Comparable object that matches when the examined object is + equal to the specified value, as reported by the compareTo method of the + examined object.
      +
      static <T extends java.lang.Comparable<T>>
      Matcher<T>
      greaterThan(T value) +
      Creates a matcher of Comparable object that matches when the examined object is + greater than the specified value, as reported by the compareTo method of the + examined object.
      +
      static <T extends java.lang.Comparable<T>>
      Matcher<T>
      greaterThanOrEqualTo(T value) +
      Creates a matcher of Comparable object that matches when the examined object is + greater than or equal to the specified value, as reported by the compareTo method + of the examined object.
      +
      static <T extends java.lang.Comparable<T>>
      Matcher<T>
      lessThan(T value) +
      Creates a matcher of Comparable object that matches when the examined object is + less than the specified value, as reported by the compareTo method of the + examined object.
      +
      static <T extends java.lang.Comparable<T>>
      Matcher<T>
      lessThanOrEqualTo(T value) +
      Creates a matcher of Comparable object that matches when the examined object is + less than or equal to the specified value, as reported by the compareTo method + of the examined object.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        comparesEqualTo

        +
        public static <T extends java.lang.Comparable<T>> Matcher<T> comparesEqualTo(T value)
        +
        Creates a matcher of Comparable object that matches when the examined object is + equal to the specified value, as reported by the compareTo method of the + examined object. + For example: +
        assertThat(1, comparesEqualTo(1))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return zero
        +
        +
      • +
      + + + + + +
        +
      • +

        greaterThan

        +
        public static <T extends java.lang.Comparable<T>> Matcher<T> greaterThan(T value)
        +
        Creates a matcher of Comparable object that matches when the examined object is + greater than the specified value, as reported by the compareTo method of the + examined object. + For example: +
        assertThat(2, greaterThan(1))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return greater + than zero
        +
        +
      • +
      + + + + + +
        +
      • +

        greaterThanOrEqualTo

        +
        public static <T extends java.lang.Comparable<T>> Matcher<T> greaterThanOrEqualTo(T value)
        +
        Creates a matcher of Comparable object that matches when the examined object is + greater than or equal to the specified value, as reported by the compareTo method + of the examined object. + For example: +
        assertThat(1, greaterThanOrEqualTo(1))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return greater + than or equal to zero
        +
        +
      • +
      + + + + + +
        +
      • +

        lessThan

        +
        public static <T extends java.lang.Comparable<T>> Matcher<T> lessThan(T value)
        +
        Creates a matcher of Comparable object that matches when the examined object is + less than the specified value, as reported by the compareTo method of the + examined object. + For example: +
        assertThat(1, lessThan(2))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return less + than zero
        +
        +
      • +
      + + + + + +
        +
      • +

        lessThanOrEqualTo

        +
        public static <T extends java.lang.Comparable<T>> Matcher<T> lessThanOrEqualTo(T value)
        +
        Creates a matcher of Comparable object that matches when the examined object is + less than or equal to the specified value, as reported by the compareTo method + of the examined object. + For example: +
        assertThat(1, lessThanOrEqualTo(1))
        +
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return less + than or equal to zero
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/number/package-frame.html b/docs/javadoc/2.1/org/hamcrest/number/package-frame.html new file mode 100644 index 00000000..a9a66340 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/number/package-frame.html @@ -0,0 +1,23 @@ + + + + + +org.hamcrest.number (Hamcrest 2.1 API) + + + + + +

org.hamcrest.number

+ + + diff --git a/docs/javadoc/2.1/org/hamcrest/number/package-summary.html b/docs/javadoc/2.1/org/hamcrest/number/package-summary.html new file mode 100644 index 00000000..48d8ca04 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/number/package-summary.html @@ -0,0 +1,166 @@ + + + + + +org.hamcrest.number (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Package org.hamcrest.number

+
+
Matchers that perform numeric comparisons.
+
+

See: Description

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    BigDecimalCloseTo 
    IsCloseTo +
    Is the value a number equal to a value within some range of + acceptable error?
    +
    IsNaN +
    Is the value a number actually not a number (NaN)?
    +
    OrderingComparison 
    +
  • +
+ + + +

Package org.hamcrest.number Description

+

Matchers that perform numeric comparisons.

+
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/number/package-tree.html b/docs/javadoc/2.1/org/hamcrest/number/package-tree.html new file mode 100644 index 00000000..ef89e979 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/number/package-tree.html @@ -0,0 +1,146 @@ + + + + + +org.hamcrest.number Class Hierarchy (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.number

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/object/HasEqualValues.html b/docs/javadoc/2.1/org/hamcrest/object/HasEqualValues.html new file mode 100644 index 00000000..5d2f8931 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/object/HasEqualValues.html @@ -0,0 +1,335 @@ + + + + + +HasEqualValues (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.object
+

Class HasEqualValues<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + + + +
        +
      • +

        HasEqualValues

        +
        public HasEqualValues(T expectedObject)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + + + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/object/HasToString.html b/docs/javadoc/2.1/org/hamcrest/object/HasToString.html new file mode 100644 index 00000000..e51e5fa9 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/object/HasToString.html @@ -0,0 +1,371 @@ + + + + + +HasToString (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.object
+

Class HasToString<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        HasToString

        +
        public HasToString(Matcher<? super java.lang.String> toStringMatcher)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        featureValueOf

        +
        protected java.lang.String featureValueOf(T actual)
        +
        Description copied from class: FeatureMatcher
        +
        Implement this to extract the interesting feature.
        +
        +
        Specified by:
        +
        featureValueOf in class FeatureMatcher<T,java.lang.String>
        +
        Parameters:
        +
        actual - the target object
        +
        Returns:
        +
        the feature to be matched
        +
        +
      • +
      + + + +
        +
      • +

        hasToString

        +
        public static <T> Matcher<T> hasToString(Matcher<? super java.lang.String> toStringMatcher)
        +
        Creates a matcher that matches any examined object whose toString method + returns a value that satisfies the specified matcher. + For example: +
        assertThat(true, hasToString(equalTo("TRUE")))
        +
        +
        Parameters:
        +
        toStringMatcher - the matcher used to verify the toString result
        +
        +
      • +
      + + + +
        +
      • +

        hasToString

        +
        public static <T> Matcher<T> hasToString(java.lang.String expectedToString)
        +
        Creates a matcher that matches any examined object whose toString method + returns a value equalTo the specified string. + For example: +
        assertThat(true, hasToString("TRUE"))
        +
        +
        Parameters:
        +
        expectedToString - the expected toString result
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/object/IsCompatibleType.html b/docs/javadoc/2.1/org/hamcrest/object/IsCompatibleType.html new file mode 100644 index 00000000..7ded8d84 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/object/IsCompatibleType.html @@ -0,0 +1,377 @@ + + + + + +IsCompatibleType (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.object
+

Class IsCompatibleType<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsCompatibleType

        +
        public IsCompatibleType(java.lang.Class<T> type)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.lang.Class<?> cls)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.lang.Class<?>>
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(java.lang.Class<?> cls,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<java.lang.Class<?>>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        typeCompatibleWith

        +
        public static <T> Matcher<java.lang.Class<?>> typeCompatibleWith(java.lang.Class<T> baseType)
        +
        Creates a matcher of Class that matches when the specified baseType is + assignable from the examined class. + For example: +
        assertThat(Integer.class, typeCompatibleWith(Number.class))
        +
        +
        Parameters:
        +
        baseType - the base class to examine classes against
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/object/IsEventFrom.html b/docs/javadoc/2.1/org/hamcrest/object/IsEventFrom.html new file mode 100644 index 00000000..4e6b36d5 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/object/IsEventFrom.html @@ -0,0 +1,385 @@ + + + + + +IsEventFrom (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.object
+

Class IsEventFrom

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.util.EventObject>, SelfDescribing
    +
    +
    +
    +
    public class IsEventFrom
    +extends TypeSafeDiagnosingMatcher<java.util.EventObject>
    +
    Tests if the value is an event announced by a specific object.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsEventFrom

        +
        public IsEventFrom(java.lang.Class<?> eventClass,
        +                   java.lang.Object source)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.util.EventObject item,
        +                             Description mismatchDescription)
        +
        Description copied from class: TypeSafeDiagnosingMatcher
        +
        Subclasses should implement this. The item will already have been checked + for the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeDiagnosingMatcher<java.util.EventObject>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        eventFrom

        +
        public static Matcher<java.util.EventObject> eventFrom(java.lang.Class<? extends java.util.EventObject> eventClass,
        +                                                       java.lang.Object source)
        +
        Creates a matcher of EventObject that matches any object + derived from eventClass announced by source. + For example: +
        assertThat(myEvent, is(eventFrom(PropertyChangeEvent.class, myBean)))
        +
        +
        Parameters:
        +
        eventClass - the class of the event to match on
        +
        source - the source of the event
        +
        +
      • +
      + + + +
        +
      • +

        eventFrom

        +
        public static Matcher<java.util.EventObject> eventFrom(java.lang.Object source)
        +
        Creates a matcher of EventObject that matches any EventObject + announced by source. + For example: +
        assertThat(myEvent, is(eventFrom(myBean)))
        +
        +
        Parameters:
        +
        source - the source of the event
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/object/package-frame.html b/docs/javadoc/2.1/org/hamcrest/object/package-frame.html new file mode 100644 index 00000000..523ee94f --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/object/package-frame.html @@ -0,0 +1,23 @@ + + + + + +org.hamcrest.object (Hamcrest 2.1 API) + + + + + +

org.hamcrest.object

+ + + diff --git a/docs/javadoc/2.1/org/hamcrest/object/package-summary.html b/docs/javadoc/2.1/org/hamcrest/object/package-summary.html new file mode 100644 index 00000000..af28ff1a --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/object/package-summary.html @@ -0,0 +1,163 @@ + + + + + +org.hamcrest.object (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Package org.hamcrest.object

+
+
Matchers that inspect objects and classes.
+
+

See: Description

+
+
+ + + + +

Package org.hamcrest.object Description

+

Matchers that inspect objects and classes.

+
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/object/package-tree.html b/docs/javadoc/2.1/org/hamcrest/object/package-tree.html new file mode 100644 index 00000000..6eb55665 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/object/package-tree.html @@ -0,0 +1,154 @@ + + + + + +org.hamcrest.object Class Hierarchy (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.object

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/package-frame.html b/docs/javadoc/2.1/org/hamcrest/package-frame.html new file mode 100644 index 00000000..9dd2400f --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/package-frame.html @@ -0,0 +1,40 @@ + + + + + +org.hamcrest (Hamcrest 2.1 API) + + + + + +

org.hamcrest

+ + + diff --git a/docs/javadoc/2.1/org/hamcrest/package-summary.html b/docs/javadoc/2.1/org/hamcrest/package-summary.html new file mode 100644 index 00000000..e530297c --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/package-summary.html @@ -0,0 +1,247 @@ + + + + + +org.hamcrest (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Package org.hamcrest

+
+
+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/package-tree.html b/docs/javadoc/2.1/org/hamcrest/package-tree.html new file mode 100644 index 00000000..f79b22a0 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/package-tree.html @@ -0,0 +1,170 @@ + + + + + +org.hamcrest Class Hierarchy (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/text/CharSequenceLength.html b/docs/javadoc/2.1/org/hamcrest/text/CharSequenceLength.html new file mode 100644 index 00000000..32731cea --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/text/CharSequenceLength.html @@ -0,0 +1,377 @@ + + + + + +CharSequenceLength (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.text
+

Class CharSequenceLength

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.CharSequence>, SelfDescribing
    +
    +
    +
    +
    public class CharSequenceLength
    +extends FeatureMatcher<java.lang.CharSequence,java.lang.Integer>
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CharSequenceLength

        +
        public CharSequenceLength(Matcher<? super java.lang.Integer> lengthMatcher)
        +
        +
        Parameters:
        +
        lengthMatcher - The matcher to apply to the feature
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        featureValueOf

        +
        protected java.lang.Integer featureValueOf(java.lang.CharSequence actual)
        +
        Description copied from class: FeatureMatcher
        +
        Implement this to extract the interesting feature.
        +
        +
        Specified by:
        +
        featureValueOf in class FeatureMatcher<java.lang.CharSequence,java.lang.Integer>
        +
        Parameters:
        +
        actual - the target object
        +
        Returns:
        +
        the feature to be matched
        +
        +
      • +
      + + + +
        +
      • +

        hasLength

        +
        public static Matcher<java.lang.CharSequence> hasLength(int length)
        +
        Creates a matcher of CharSequence that matches when a char sequence has the given length + For example: + +
        + assertThat("text", hasLength(4))
        + 
        +
        +
        Parameters:
        +
        length - the expected length of the string
        +
        +
      • +
      + + + +
        +
      • +

        hasLength

        +
        public static Matcher<java.lang.CharSequence> hasLength(Matcher<? super java.lang.Integer> lengthMatcher)
        +
        Creates a matcher of CharSequence that matches when a char sequence has the given length + For example: + +
        + assertThat("text", hasLength(lessThan(4)))
        + 
        +
        +
        Parameters:
        +
        lengthMatcher - the expected length of the string
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/text/IsBlankString.html b/docs/javadoc/2.1/org/hamcrest/text/IsBlankString.html new file mode 100644 index 00000000..216197bc --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/text/IsBlankString.html @@ -0,0 +1,336 @@ + + + + + +IsBlankString (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.text
+

Class IsBlankString

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.String>, SelfDescribing
    +
    +
    +
    +
    public final class IsBlankString
    +extends TypeSafeMatcher<java.lang.String>
    +
    Matches blank Strings (and null).
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.lang.String item)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.lang.String>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        blankString

        +
        public static Matcher<java.lang.String> blankString()
        +
        Creates a matcher of String that matches when the examined string contains + zero or more whitespace characters and nothing else. + For example: +
        assertThat("  ", is(blankString()))
        +
      • +
      + + + +
        +
      • +

        blankOrNullString

        +
        public static Matcher<java.lang.String> blankOrNullString()
        +
        Creates a matcher of String that matches when the examined string is null, or + contains zero or more whitespace characters and nothing else. + For example: +
        assertThat(((String)null), is(blankOrNullString()))
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/text/IsEmptyString.html b/docs/javadoc/2.1/org/hamcrest/text/IsEmptyString.html new file mode 100644 index 00000000..d809bd49 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/text/IsEmptyString.html @@ -0,0 +1,379 @@ + + + + + +IsEmptyString (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.text
+

Class IsEmptyString

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.String>, SelfDescribing
    +
    +
    +
    +
    public final class IsEmptyString
    +extends TypeSafeMatcher<java.lang.String>
    +
    Matches empty Strings (and null).
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.lang.String item)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.lang.String>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        isEmptyString

        +
        @Deprecated
        +public static Matcher<java.lang.String> isEmptyString()
        +
        Deprecated. use is(emptyString()) instead
        +
        Creates a matcher of String that matches when the examined string has zero length. + For example: +
        assertThat("", isEmptyString())
        +
      • +
      + + + +
        +
      • +

        emptyString

        +
        public static Matcher<java.lang.String> emptyString()
        +
        Creates a matcher of String that matches when the examined string has zero length. + For example: +
        assertThat("", is(emptyString()))
        +
      • +
      + + + +
        +
      • +

        isEmptyOrNullString

        +
        @Deprecated
        +public static Matcher<java.lang.String> isEmptyOrNullString()
        +
        Deprecated. use is(emptyOrNullString()) instead
        +
        Creates a matcher of String that matches when the examined string is null, or + has zero length. + For example: +
        assertThat(((String)null), isEmptyOrNullString())
        +
      • +
      + + + +
        +
      • +

        emptyOrNullString

        +
        public static Matcher<java.lang.String> emptyOrNullString()
        +
        Creates a matcher of String that matches when the examined string is null, or + has zero length. + For example: +
        assertThat(((String)null), is(emptyOrNullString()))
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/text/IsEqualCompressingWhiteSpace.html b/docs/javadoc/2.1/org/hamcrest/text/IsEqualCompressingWhiteSpace.html new file mode 100644 index 00000000..af17d82f --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/text/IsEqualCompressingWhiteSpace.html @@ -0,0 +1,418 @@ + + + + + +IsEqualCompressingWhiteSpace (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.text
+

Class IsEqualCompressingWhiteSpace

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.String>, SelfDescribing
    +
    +
    +
    +
    public class IsEqualCompressingWhiteSpace
    +extends TypeSafeMatcher<java.lang.String>
    +
    Tests if a string is equal to another string, compressing any changes in whitespace.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsEqualCompressingWhiteSpace

        +
        public IsEqualCompressingWhiteSpace(java.lang.String string)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.lang.String item)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.lang.String>
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(java.lang.String item,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<java.lang.String>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        stripSpaces

        +
        public java.lang.String stripSpaces(java.lang.String toBeStripped)
        +
      • +
      + + + +
        +
      • +

        equalToIgnoringWhiteSpace

        +
        public static Matcher<java.lang.String> equalToIgnoringWhiteSpace(java.lang.String expectedString)
        + +
        +
        Parameters:
        +
        expectedString - the expected value of matched strings
        +
        +
      • +
      + + + +
        +
      • +

        equalToCompressingWhiteSpace

        +
        public static Matcher<java.lang.String> equalToCompressingWhiteSpace(java.lang.String expectedString)
        +
        Creates a matcher of String that matches when the examined string is equal to + the specified expectedString, when whitespace differences are (mostly) ignored. To be + exact, the following whitespace rules are applied: +
          +
        • all leading and trailing whitespace of both the expectedString and the examined string are ignored
        • +
        • any remaining whitespace, appearing within either string, is collapsed to a single space before comparison
        • +
        + For example: +
        assertThat("   my\tfoo  bar ", equalToCompressingWhiteSpace(" my  foo bar"))
        +
        +
        Parameters:
        +
        expectedString - the expected value of matched strings
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/text/IsEqualIgnoringCase.html b/docs/javadoc/2.1/org/hamcrest/text/IsEqualIgnoringCase.html new file mode 100644 index 00000000..89fcb922 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/text/IsEqualIgnoringCase.html @@ -0,0 +1,378 @@ + + + + + +IsEqualIgnoringCase (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.text
+

Class IsEqualIgnoringCase

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<java.lang.String>, SelfDescribing
    +
    +
    +
    +
    public class IsEqualIgnoringCase
    +extends TypeSafeMatcher<java.lang.String>
    +
    Tests if a string is equal to another string, regardless of the case.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        IsEqualIgnoringCase

        +
        public IsEqualIgnoringCase(java.lang.String string)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.lang.String item)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.lang.String>
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(java.lang.String item,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<java.lang.String>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        equalToIgnoringCase

        +
        public static Matcher<java.lang.String> equalToIgnoringCase(java.lang.String expectedString)
        +
        Creates a matcher of String that matches when the examined string is equal to + the specified expectedString, ignoring case. + For example: +
        assertThat("Foo", equalToIgnoringCase("FOO"))
        +
        +
        Parameters:
        +
        expectedString - the expected value of matched strings
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/text/MatchesPattern.html b/docs/javadoc/2.1/org/hamcrest/text/MatchesPattern.html new file mode 100644 index 00000000..783163fe --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/text/MatchesPattern.html @@ -0,0 +1,365 @@ + + + + + +MatchesPattern (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.text
+

Class MatchesPattern

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MatchesPattern

        +
        public MatchesPattern(java.util.regex.Pattern pattern)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        protected boolean matchesSafely(java.lang.String item)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.lang.String>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        matchesPattern

        +
        public static Matcher<java.lang.String> matchesPattern(java.util.regex.Pattern pattern)
        +
        Creates a matcher of String that matches when the examined string + exactly matches the given Pattern.
        +
      • +
      + + + +
        +
      • +

        matchesPattern

        +
        public static Matcher<java.lang.String> matchesPattern(java.lang.String regex)
        +
        Creates a matcher of String that matches when the examined string + exactly matches the given regular expression, treated as a Pattern.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/text/StringContainsInOrder.html b/docs/javadoc/2.1/org/hamcrest/text/StringContainsInOrder.html new file mode 100644 index 00000000..af1d298e --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/text/StringContainsInOrder.html @@ -0,0 +1,403 @@ + + + + + +StringContainsInOrder (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.text
+

Class StringContainsInOrder

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StringContainsInOrder

        +
        public StringContainsInOrder(java.lang.Iterable<java.lang.String> substrings)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(java.lang.String s)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should implement this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeMatcher<java.lang.String>
        +
        +
      • +
      + + + +
        +
      • +

        describeMismatchSafely

        +
        public void describeMismatchSafely(java.lang.String item,
        +                                   Description mismatchDescription)
        +
        Description copied from class: TypeSafeMatcher
        +
        Subclasses should override this. The item will already have been checked for + the specific type and will never be null.
        +
        +
        Overrides:
        +
        describeMismatchSafely in class TypeSafeMatcher<java.lang.String>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        stringContainsInOrder

        +
        public static Matcher<java.lang.String> stringContainsInOrder(java.lang.Iterable<java.lang.String> substrings)
        +
        Creates a matcher of String that matches when the examined string contains all of + the specified substrings, considering the order of their appearance. + For example: +
        assertThat("myfoobarbaz", stringContainsInOrder(Arrays.asList("bar", "foo")))
        + fails as "foo" occurs before "bar" in the string "myfoobarbaz"
        +
        +
        Parameters:
        +
        substrings - the substrings that must be contained within matching strings
        +
        +
      • +
      + + + +
        +
      • +

        stringContainsInOrder

        +
        public static Matcher<java.lang.String> stringContainsInOrder(java.lang.String... substrings)
        +
        Creates a matcher of String that matches when the examined string contains all of + the specified substrings, considering the order of their appearance. + For example: +
        assertThat("myfoobarbaz", stringContainsInOrder("bar", "foo"))
        + fails as "foo" occurs before "bar" in the string "myfoobarbaz"
        +
        +
        Parameters:
        +
        substrings - the substrings that must be contained within matching strings
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/text/package-frame.html b/docs/javadoc/2.1/org/hamcrest/text/package-frame.html new file mode 100644 index 00000000..e31627a3 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/text/package-frame.html @@ -0,0 +1,26 @@ + + + + + +org.hamcrest.text (Hamcrest 2.1 API) + + + + + +

org.hamcrest.text

+ + + diff --git a/docs/javadoc/2.1/org/hamcrest/text/package-summary.html b/docs/javadoc/2.1/org/hamcrest/text/package-summary.html new file mode 100644 index 00000000..9e7ebbda --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/text/package-summary.html @@ -0,0 +1,181 @@ + + + + + +org.hamcrest.text (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Package org.hamcrest.text

+
+
Matchers that perform text comparisons.
+
+

See: Description

+
+
+ + + + +

Package org.hamcrest.text Description

+

Matchers that perform text comparisons.

+
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/text/package-tree.html b/docs/javadoc/2.1/org/hamcrest/text/package-tree.html new file mode 100644 index 00000000..8b6ef8b1 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/text/package-tree.html @@ -0,0 +1,157 @@ + + + + + +org.hamcrest.text Class Hierarchy (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.text

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/xml/HasXPath.html b/docs/javadoc/2.1/org/hamcrest/xml/HasXPath.html new file mode 100644 index 00000000..4897d416 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/xml/HasXPath.html @@ -0,0 +1,509 @@ + + + + + +HasXPath (Hamcrest 2.1 API) + + + + + + + + + + + + +
+
org.hamcrest.xml
+

Class HasXPath

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Matcher<org.w3c.dom.Node>, SelfDescribing
    +
    +
    +
    +
    public class HasXPath
    +extends TypeSafeDiagnosingMatcher<org.w3c.dom.Node>
    +
    Applies a Matcher to a given XML Node in an existing XML Node tree, specified by an XPath expression.
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      static javax.xml.namespace.NamespaceContextNO_NAMESPACE_CONTEXT 
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      HasXPath(java.lang.String xPathExpression, + Matcher<java.lang.String> valueMatcher) 
      HasXPath(java.lang.String xPathExpression, + javax.xml.namespace.NamespaceContext namespaceContext, + Matcher<java.lang.String> valueMatcher) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voiddescribeTo(Description description) +
      Generates a description of the object.
      +
      static Matcher<org.w3c.dom.Node>hasXPath(java.lang.String xPath) +
      Creates a matcher of Nodes that matches when the examined node contains a node + at the specified xPath, with any content.
      +
      static Matcher<org.w3c.dom.Node>hasXPath(java.lang.String xPath, + Matcher<java.lang.String> valueMatcher) +
      Creates a matcher of Nodes that matches when the examined node has a value at the + specified xPath that satisfies the specified valueMatcher.
      +
      static Matcher<org.w3c.dom.Node>hasXPath(java.lang.String xPath, + javax.xml.namespace.NamespaceContext namespaceContext) +
      Creates a matcher of Nodes that matches when the examined node contains a node + at the specified xPath within the specified namespace context, with any content.
      +
      static Matcher<org.w3c.dom.Node>hasXPath(java.lang.String xPath, + javax.xml.namespace.NamespaceContext namespaceContext, + Matcher<java.lang.String> valueMatcher) +
      Creates a matcher of Nodes that matches when the examined node has a value at the + specified xPath, within the specified namespaceContext, that satisfies + the specified valueMatcher.
      +
      booleanmatchesSafely(org.w3c.dom.Node item, + Description mismatch) +
      Subclasses should implement this.
      +
      + + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        NO_NAMESPACE_CONTEXT

        +
        public static final javax.xml.namespace.NamespaceContext NO_NAMESPACE_CONTEXT
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        HasXPath

        +
        public HasXPath(java.lang.String xPathExpression,
        +                Matcher<java.lang.String> valueMatcher)
        +
        +
        Parameters:
        +
        xPathExpression - XPath expression.
        +
        valueMatcher - Matcher to use at given XPath. + May be null to specify that the XPath must exist but the value is irrelevant.
        +
        +
      • +
      + + + +
        +
      • +

        HasXPath

        +
        public HasXPath(java.lang.String xPathExpression,
        +                javax.xml.namespace.NamespaceContext namespaceContext,
        +                Matcher<java.lang.String> valueMatcher)
        +
        +
        Parameters:
        +
        xPathExpression - XPath expression.
        +
        namespaceContext - Resolves XML namespace prefixes in the XPath expression
        +
        valueMatcher - Matcher to use at given XPath. + May be null to specify that the XPath must exist but the value is irrelevant.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(org.w3c.dom.Node item,
        +                             Description mismatch)
        +
        Description copied from class: TypeSafeDiagnosingMatcher
        +
        Subclasses should implement this. The item will already have been checked + for the specific type and will never be null.
        +
        +
        Specified by:
        +
        matchesSafely in class TypeSafeDiagnosingMatcher<org.w3c.dom.Node>
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        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 - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        hasXPath

        +
        public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath,
        +                                                 Matcher<java.lang.String> valueMatcher)
        +
        Creates a matcher of Nodes that matches when the examined node has a value at the + specified xPath that satisfies the specified valueMatcher. + For example: +
        assertThat(xml, hasXPath("/root/something[2]/cheese", equalTo("Cheddar")))
        +
        +
        Parameters:
        +
        xPath - the target xpath
        +
        valueMatcher - matcher for the value at the specified xpath
        +
        +
      • +
      + + + +
        +
      • +

        hasXPath

        +
        public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath,
        +                                                 javax.xml.namespace.NamespaceContext namespaceContext,
        +                                                 Matcher<java.lang.String> valueMatcher)
        +
        Creates a matcher of Nodes that matches when the examined node has a value at the + specified xPath, within the specified namespaceContext, that satisfies + the specified valueMatcher. + For example: +
        assertThat(xml, hasXPath("/root/something[2]/cheese", myNs, equalTo("Cheddar")))
        +
        +
        Parameters:
        +
        xPath - the target xpath
        +
        namespaceContext - the namespace for matching nodes
        +
        valueMatcher - matcher for the value at the specified xpath
        +
        +
      • +
      + + + +
        +
      • +

        hasXPath

        +
        public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath)
        +
        Creates a matcher of Nodes that matches when the examined node contains a node + at the specified xPath, with any content. + For example: +
        assertThat(xml, hasXPath("/root/something[2]/cheese"))
        +
        +
        Parameters:
        +
        xPath - the target xpath
        +
        +
      • +
      + + + +
        +
      • +

        hasXPath

        +
        public static Matcher<org.w3c.dom.Node> hasXPath(java.lang.String xPath,
        +                                                 javax.xml.namespace.NamespaceContext namespaceContext)
        +
        Creates a matcher of Nodes that matches when the examined node contains a node + at the specified xPath within the specified namespace context, with any content. + For example: +
        assertThat(xml, hasXPath("/root/something[2]/cheese", myNs))
        +
        +
        Parameters:
        +
        xPath - the target xpath
        +
        namespaceContext - the namespace for matching nodes
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/xml/package-frame.html b/docs/javadoc/2.1/org/hamcrest/xml/package-frame.html new file mode 100644 index 00000000..d558d8ae --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/xml/package-frame.html @@ -0,0 +1,20 @@ + + + + + +org.hamcrest.xml (Hamcrest 2.1 API) + + + + + +

org.hamcrest.xml

+
+

Classes

+ +
+ + diff --git a/docs/javadoc/2.1/org/hamcrest/xml/package-summary.html b/docs/javadoc/2.1/org/hamcrest/xml/package-summary.html new file mode 100644 index 00000000..a68fd9d6 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/xml/package-summary.html @@ -0,0 +1,151 @@ + + + + + +org.hamcrest.xml (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Package org.hamcrest.xml

+
+
Matchers of XML documents.
+
+

See: Description

+
+
+
    +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    HasXPath +
    Applies a Matcher to a given XML Node in an existing XML Node tree, specified by an XPath expression.
    +
    +
  • +
+ + + +

Package org.hamcrest.xml Description

+

Matchers of XML documents.

+
+ + + + + + diff --git a/docs/javadoc/2.1/org/hamcrest/xml/package-tree.html b/docs/javadoc/2.1/org/hamcrest/xml/package-tree.html new file mode 100644 index 00000000..f0eba081 --- /dev/null +++ b/docs/javadoc/2.1/org/hamcrest/xml/package-tree.html @@ -0,0 +1,143 @@ + + + + + +org.hamcrest.xml Class Hierarchy (Hamcrest 2.1 API) + + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.xml

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/2.1/overview-frame.html b/docs/javadoc/2.1/overview-frame.html new file mode 100644 index 00000000..9cbe8e61 --- /dev/null +++ b/docs/javadoc/2.1/overview-frame.html @@ -0,0 +1,31 @@ + + + + + +Overview List (Hamcrest 2.1 API) + + + + + + + +

 

+ + diff --git a/docs/javadoc/2.1/overview-summary.html b/docs/javadoc/2.1/overview-summary.html new file mode 100644 index 00000000..ce4b1d80 --- /dev/null +++ b/docs/javadoc/2.1/overview-summary.html @@ -0,0 +1,190 @@ + + + + + +Overview (Hamcrest 2.1 API) + + + + + + + + +
+ + + + + + + +
+ + +
+

Hamcrest 2.1 API

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Packages 
PackageDescription
org.hamcrest 
org.hamcrest.beans +
Matchers of Java Bean properties and their values.
+
org.hamcrest.collection +
Matchers of arrays and collections.
+
org.hamcrest.comparator 
org.hamcrest.core +
Fundamental matchers of objects and values, and composite matchers.
+
org.hamcrest.internal 
org.hamcrest.io 
org.hamcrest.number +
Matchers that perform numeric comparisons.
+
org.hamcrest.object +
Matchers that inspect objects and classes.
+
org.hamcrest.text +
Matchers that perform text comparisons.
+
org.hamcrest.xml +
Matchers of XML documents.
+
+
+ +
+ + + + + + + +
+ + + + diff --git a/docs/javadoc/2.1/overview-tree.html b/docs/javadoc/2.1/overview-tree.html new file mode 100644 index 00000000..04614203 --- /dev/null +++ b/docs/javadoc/2.1/overview-tree.html @@ -0,0 +1,255 @@ + + + + + +Class Hierarchy (Hamcrest 2.1 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/docs/javadoc/2.1/package-list b/docs/javadoc/2.1/package-list new file mode 100644 index 00000000..37d7af53 --- /dev/null +++ b/docs/javadoc/2.1/package-list @@ -0,0 +1,11 @@ +org.hamcrest +org.hamcrest.beans +org.hamcrest.collection +org.hamcrest.comparator +org.hamcrest.core +org.hamcrest.internal +org.hamcrest.io +org.hamcrest.number +org.hamcrest.object +org.hamcrest.text +org.hamcrest.xml diff --git a/docs/javadoc/2.1/script.js b/docs/javadoc/2.1/script.js new file mode 100644 index 00000000..b3463569 --- /dev/null +++ b/docs/javadoc/2.1/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/docs/javadoc/2.1/stylesheet.css b/docs/javadoc/2.1/stylesheet.css new file mode 100644 index 00000000..98055b22 --- /dev/null +++ b/docs/javadoc/2.1/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/docs/javadoc/index.html b/docs/javadoc/index.html index 71c9ae4f..51bac4d0 100644 --- a/docs/javadoc/index.html +++ b/docs/javadoc/index.html @@ -66,6 +66,11 @@

Java Hamcrest

Matchers that can be combined to create flexible expressions of intent

API Reference Documentation (JavaDoc)

+

Lastest Version

+ +

Previous Versions