From 68984b85e869df6a888fffcad87e4b676a8fc0ac Mon Sep 17 00:00:00 2001 From: Joe Schmetzer Date: Thu, 1 Aug 2024 19:01:18 +1000 Subject: [PATCH] Version 3.0 --- build.gradle | 2 +- docs/distributables.md | 16 +- docs/javadoc/3.0/allclasses-frame.html | 101 + docs/javadoc/3.0/allclasses-noframe.html | 101 + docs/javadoc/3.0/constant-values.html | 121 + docs/javadoc/3.0/deprecated-list.html | 289 ++ docs/javadoc/3.0/help-doc.html | 222 + docs/javadoc/3.0/index-all.html | 2786 ++++++++++++ docs/javadoc/3.0/index.html | 75 + .../3.0/org/hamcrest/BaseDescription.html | 523 +++ .../javadoc/3.0/org/hamcrest/BaseMatcher.html | 382 ++ .../3.0/org/hamcrest/Condition.Step.html | 226 + docs/javadoc/3.0/org/hamcrest/Condition.html | 366 ++ .../3.0/org/hamcrest/CoreMatchers.html | 1252 +++++ .../3.0/org/hamcrest/CustomMatcher.html | 323 ++ .../org/hamcrest/CustomTypeSafeMatcher.html | 325 ++ .../hamcrest/Description.NullDescription.html | 496 ++ .../javadoc/3.0/org/hamcrest/Description.html | 440 ++ .../3.0/org/hamcrest/DiagnosingMatcher.html | 364 ++ .../3.0/org/hamcrest/FeatureMatcher.html | 385 ++ docs/javadoc/3.0/org/hamcrest/Matcher.html | 327 ++ .../3.0/org/hamcrest/MatcherAssert.html | 306 ++ docs/javadoc/3.0/org/hamcrest/Matchers.html | 4045 +++++++++++++++++ .../3.0/org/hamcrest/SelfDescribing.html | 236 + .../3.0/org/hamcrest/StringDescription.html | 426 ++ .../hamcrest/TypeSafeDiagnosingMatcher.html | 429 ++ .../3.0/org/hamcrest/TypeSafeMatcher.html | 446 ++ .../3.0/org/hamcrest/beans/HasProperty.html | 394 ++ .../hamcrest/beans/HasPropertyWithValue.html | 467 ++ .../3.0/org/hamcrest/beans/PropertyUtil.html | 356 ++ .../hamcrest/beans/SamePropertyValuesAs.html | 367 ++ .../3.0/org/hamcrest/beans/package-frame.html | 22 + .../org/hamcrest/beans/package-summary.html | 168 + .../3.0/org/hamcrest/beans/package-tree.html | 153 + .../collection/ArrayAsIterableMatcher.html | 416 ++ .../hamcrest/collection/ArrayMatching.html | 541 +++ .../hamcrest/collection/HasItemInArray.html | 364 ++ .../3.0/org/hamcrest/collection/IsArray.html | 462 ++ .../IsArrayContainingInAnyOrder.html | 489 ++ .../collection/IsArrayContainingInOrder.html | 473 ++ .../hamcrest/collection/IsArrayWithSize.html | 405 ++ .../collection/IsCollectionWithSize.html | 377 ++ .../collection/IsEmptyCollection.html | 414 ++ .../hamcrest/collection/IsEmptyIterable.html | 410 ++ .../3.0/org/hamcrest/collection/IsIn.html | 525 +++ .../IsIterableContainingInAnyOrder.html | 460 ++ .../IsIterableContainingInOrder.html | 463 ++ .../IsIterableContainingInRelativeOrder.html | 431 ++ .../collection/IsIterableWithSize.html | 380 ++ .../hamcrest/collection/IsMapContaining.html | 547 +++ .../hamcrest/collection/IsMapWithSize.html | 406 ++ .../hamcrest/collection/package-frame.html | 35 + .../hamcrest/collection/package-summary.html | 230 + .../org/hamcrest/collection/package-tree.html | 166 + .../comparator/ComparatorMatcherBuilder.html | 429 ++ .../hamcrest/comparator/package-frame.html | 19 + .../hamcrest/comparator/package-summary.html | 139 + .../org/hamcrest/comparator/package-tree.html | 134 + docs/javadoc/3.0/org/hamcrest/core/AllOf.html | 393 ++ docs/javadoc/3.0/org/hamcrest/core/AnyOf.html | 426 ++ ...mbinableMatcher.CombinableBothMatcher.html | 272 ++ ...inableMatcher.CombinableEitherMatcher.html | 272 ++ .../org/hamcrest/core/CombinableMatcher.html | 443 ++ .../3.0/org/hamcrest/core/DescribedAs.html | 394 ++ docs/javadoc/3.0/org/hamcrest/core/Every.html | 365 ++ docs/javadoc/3.0/org/hamcrest/core/Is.html | 449 ++ .../3.0/org/hamcrest/core/IsAnything.html | 381 ++ .../hamcrest/core/IsCollectionContaining.html | 480 ++ .../3.0/org/hamcrest/core/IsEqual.html | 398 ++ .../3.0/org/hamcrest/core/IsInstanceOf.html | 401 ++ .../hamcrest/core/IsIterableContaining.html | 465 ++ docs/javadoc/3.0/org/hamcrest/core/IsNot.html | 383 ++ .../javadoc/3.0/org/hamcrest/core/IsNull.html | 427 ++ .../javadoc/3.0/org/hamcrest/core/IsSame.html | 383 ++ .../3.0/org/hamcrest/core/StringContains.html | 394 ++ .../3.0/org/hamcrest/core/StringEndsWith.html | 394 ++ .../core/StringRegularExpression.html | 389 ++ .../org/hamcrest/core/StringStartsWith.html | 400 ++ .../org/hamcrest/core/SubstringMatcher.html | 431 ++ .../3.0/org/hamcrest/core/package-frame.html | 39 + .../org/hamcrest/core/package-summary.html | 260 ++ .../3.0/org/hamcrest/core/package-tree.html | 173 + .../org/hamcrest/internal/ArrayIterator.html | 318 ++ .../3.0/org/hamcrest/internal/NullSafety.html | 268 ++ .../internal/ReflectiveTypeFinder.html | 272 ++ .../internal/SelfDescribingValue.html | 287 ++ .../internal/SelfDescribingValueIterator.html | 318 ++ .../org/hamcrest/internal/package-frame.html | 23 + .../hamcrest/internal/package-summary.html | 155 + .../org/hamcrest/internal/package-tree.html | 138 + .../hamcrest/io/FileMatchers.FileStatus.html | 222 + .../3.0/org/hamcrest/io/FileMatchers.html | 492 ++ .../3.0/org/hamcrest/io/package-frame.html | 23 + .../3.0/org/hamcrest/io/package-summary.html | 154 + .../3.0/org/hamcrest/io/package-tree.html | 138 + .../hamcrest/number/BigDecimalCloseTo.html | 391 ++ .../3.0/org/hamcrest/number/IsCloseTo.html | 392 ++ .../3.0/org/hamcrest/number/IsNaN.html | 348 ++ .../hamcrest/number/OrderingComparison.html | 385 ++ .../org/hamcrest/number/package-frame.html | 22 + .../org/hamcrest/number/package-summary.html | 165 + .../3.0/org/hamcrest/number/package-tree.html | 145 + .../org/hamcrest/object/HasEqualValues.html | 339 ++ .../3.0/org/hamcrest/object/HasToString.html | 378 ++ .../org/hamcrest/object/IsCompatibleType.html | 387 ++ .../3.0/org/hamcrest/object/IsEventFrom.html | 393 ++ .../org/hamcrest/object/package-frame.html | 22 + .../org/hamcrest/object/package-summary.html | 162 + .../3.0/org/hamcrest/object/package-tree.html | 153 + .../3.0/org/hamcrest/package-frame.html | 39 + .../3.0/org/hamcrest/package-summary.html | 246 + .../3.0/org/hamcrest/package-tree.html | 169 + .../org/hamcrest/text/CharSequenceLength.html | 380 ++ .../3.0/org/hamcrest/text/IsBlankString.html | 347 ++ .../3.0/org/hamcrest/text/IsEmptyString.html | 398 ++ .../text/IsEqualCompressingWhiteSpace.html | 441 ++ .../hamcrest/text/IsEqualIgnoringCase.html | 386 ++ .../3.0/org/hamcrest/text/MatchesPattern.html | 380 ++ .../hamcrest/text/StringContainsInOrder.html | 413 ++ .../3.0/org/hamcrest/text/package-frame.html | 25 + .../org/hamcrest/text/package-summary.html | 180 + .../3.0/org/hamcrest/text/package-tree.html | 156 + .../3.0/org/hamcrest/xml/HasXPath.html | 521 +++ .../3.0/org/hamcrest/xml/package-frame.html | 19 + .../3.0/org/hamcrest/xml/package-summary.html | 150 + .../3.0/org/hamcrest/xml/package-tree.html | 142 + docs/javadoc/3.0/overview-frame.html | 30 + docs/javadoc/3.0/overview-summary.html | 189 + docs/javadoc/3.0/overview-tree.html | 254 ++ docs/javadoc/3.0/package-list | 11 + docs/javadoc/3.0/script.js | 30 + docs/javadoc/3.0/stylesheet.css | 574 +++ docs/javadoc/index.html | 3 +- 133 files changed, 46427 insertions(+), 10 deletions(-) create mode 100644 docs/javadoc/3.0/allclasses-frame.html create mode 100644 docs/javadoc/3.0/allclasses-noframe.html create mode 100644 docs/javadoc/3.0/constant-values.html create mode 100644 docs/javadoc/3.0/deprecated-list.html create mode 100644 docs/javadoc/3.0/help-doc.html create mode 100644 docs/javadoc/3.0/index-all.html create mode 100644 docs/javadoc/3.0/index.html create mode 100644 docs/javadoc/3.0/org/hamcrest/BaseDescription.html create mode 100644 docs/javadoc/3.0/org/hamcrest/BaseMatcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/Condition.Step.html create mode 100644 docs/javadoc/3.0/org/hamcrest/Condition.html create mode 100644 docs/javadoc/3.0/org/hamcrest/CoreMatchers.html create mode 100644 docs/javadoc/3.0/org/hamcrest/CustomMatcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/CustomTypeSafeMatcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/Description.NullDescription.html create mode 100644 docs/javadoc/3.0/org/hamcrest/Description.html create mode 100644 docs/javadoc/3.0/org/hamcrest/DiagnosingMatcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/FeatureMatcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/Matcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/MatcherAssert.html create mode 100644 docs/javadoc/3.0/org/hamcrest/Matchers.html create mode 100644 docs/javadoc/3.0/org/hamcrest/SelfDescribing.html create mode 100644 docs/javadoc/3.0/org/hamcrest/StringDescription.html create mode 100644 docs/javadoc/3.0/org/hamcrest/TypeSafeDiagnosingMatcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/TypeSafeMatcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/beans/HasProperty.html create mode 100644 docs/javadoc/3.0/org/hamcrest/beans/HasPropertyWithValue.html create mode 100644 docs/javadoc/3.0/org/hamcrest/beans/PropertyUtil.html create mode 100644 docs/javadoc/3.0/org/hamcrest/beans/SamePropertyValuesAs.html create mode 100644 docs/javadoc/3.0/org/hamcrest/beans/package-frame.html create mode 100644 docs/javadoc/3.0/org/hamcrest/beans/package-summary.html create mode 100644 docs/javadoc/3.0/org/hamcrest/beans/package-tree.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/ArrayAsIterableMatcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/ArrayMatching.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/HasItemInArray.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsArray.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsArrayContainingInAnyOrder.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsArrayContainingInOrder.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsArrayWithSize.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsCollectionWithSize.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsEmptyCollection.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsEmptyIterable.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsIn.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsIterableContainingInAnyOrder.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsIterableContainingInOrder.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsIterableContainingInRelativeOrder.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsIterableWithSize.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsMapContaining.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/IsMapWithSize.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/package-frame.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/package-summary.html create mode 100644 docs/javadoc/3.0/org/hamcrest/collection/package-tree.html create mode 100644 docs/javadoc/3.0/org/hamcrest/comparator/ComparatorMatcherBuilder.html create mode 100644 docs/javadoc/3.0/org/hamcrest/comparator/package-frame.html create mode 100644 docs/javadoc/3.0/org/hamcrest/comparator/package-summary.html create mode 100644 docs/javadoc/3.0/org/hamcrest/comparator/package-tree.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/AllOf.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/AnyOf.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/CombinableMatcher.CombinableBothMatcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/CombinableMatcher.CombinableEitherMatcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/CombinableMatcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/DescribedAs.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/Every.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/Is.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/IsAnything.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/IsCollectionContaining.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/IsEqual.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/IsInstanceOf.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/IsIterableContaining.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/IsNot.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/IsNull.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/IsSame.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/StringContains.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/StringEndsWith.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/StringRegularExpression.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/StringStartsWith.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/SubstringMatcher.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/package-frame.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/package-summary.html create mode 100644 docs/javadoc/3.0/org/hamcrest/core/package-tree.html create mode 100644 docs/javadoc/3.0/org/hamcrest/internal/ArrayIterator.html create mode 100644 docs/javadoc/3.0/org/hamcrest/internal/NullSafety.html create mode 100644 docs/javadoc/3.0/org/hamcrest/internal/ReflectiveTypeFinder.html create mode 100644 docs/javadoc/3.0/org/hamcrest/internal/SelfDescribingValue.html create mode 100644 docs/javadoc/3.0/org/hamcrest/internal/SelfDescribingValueIterator.html create mode 100644 docs/javadoc/3.0/org/hamcrest/internal/package-frame.html create mode 100644 docs/javadoc/3.0/org/hamcrest/internal/package-summary.html create mode 100644 docs/javadoc/3.0/org/hamcrest/internal/package-tree.html create mode 100644 docs/javadoc/3.0/org/hamcrest/io/FileMatchers.FileStatus.html create mode 100644 docs/javadoc/3.0/org/hamcrest/io/FileMatchers.html create mode 100644 docs/javadoc/3.0/org/hamcrest/io/package-frame.html create mode 100644 docs/javadoc/3.0/org/hamcrest/io/package-summary.html create mode 100644 docs/javadoc/3.0/org/hamcrest/io/package-tree.html create mode 100644 docs/javadoc/3.0/org/hamcrest/number/BigDecimalCloseTo.html create mode 100644 docs/javadoc/3.0/org/hamcrest/number/IsCloseTo.html create mode 100644 docs/javadoc/3.0/org/hamcrest/number/IsNaN.html create mode 100644 docs/javadoc/3.0/org/hamcrest/number/OrderingComparison.html create mode 100644 docs/javadoc/3.0/org/hamcrest/number/package-frame.html create mode 100644 docs/javadoc/3.0/org/hamcrest/number/package-summary.html create mode 100644 docs/javadoc/3.0/org/hamcrest/number/package-tree.html create mode 100644 docs/javadoc/3.0/org/hamcrest/object/HasEqualValues.html create mode 100644 docs/javadoc/3.0/org/hamcrest/object/HasToString.html create mode 100644 docs/javadoc/3.0/org/hamcrest/object/IsCompatibleType.html create mode 100644 docs/javadoc/3.0/org/hamcrest/object/IsEventFrom.html create mode 100644 docs/javadoc/3.0/org/hamcrest/object/package-frame.html create mode 100644 docs/javadoc/3.0/org/hamcrest/object/package-summary.html create mode 100644 docs/javadoc/3.0/org/hamcrest/object/package-tree.html create mode 100644 docs/javadoc/3.0/org/hamcrest/package-frame.html create mode 100644 docs/javadoc/3.0/org/hamcrest/package-summary.html create mode 100644 docs/javadoc/3.0/org/hamcrest/package-tree.html create mode 100644 docs/javadoc/3.0/org/hamcrest/text/CharSequenceLength.html create mode 100644 docs/javadoc/3.0/org/hamcrest/text/IsBlankString.html create mode 100644 docs/javadoc/3.0/org/hamcrest/text/IsEmptyString.html create mode 100644 docs/javadoc/3.0/org/hamcrest/text/IsEqualCompressingWhiteSpace.html create mode 100644 docs/javadoc/3.0/org/hamcrest/text/IsEqualIgnoringCase.html create mode 100644 docs/javadoc/3.0/org/hamcrest/text/MatchesPattern.html create mode 100644 docs/javadoc/3.0/org/hamcrest/text/StringContainsInOrder.html create mode 100644 docs/javadoc/3.0/org/hamcrest/text/package-frame.html create mode 100644 docs/javadoc/3.0/org/hamcrest/text/package-summary.html create mode 100644 docs/javadoc/3.0/org/hamcrest/text/package-tree.html create mode 100644 docs/javadoc/3.0/org/hamcrest/xml/HasXPath.html create mode 100644 docs/javadoc/3.0/org/hamcrest/xml/package-frame.html create mode 100644 docs/javadoc/3.0/org/hamcrest/xml/package-summary.html create mode 100644 docs/javadoc/3.0/org/hamcrest/xml/package-tree.html create mode 100644 docs/javadoc/3.0/overview-frame.html create mode 100644 docs/javadoc/3.0/overview-summary.html create mode 100644 docs/javadoc/3.0/overview-tree.html create mode 100644 docs/javadoc/3.0/package-list create mode 100644 docs/javadoc/3.0/script.js create mode 100644 docs/javadoc/3.0/stylesheet.css diff --git a/build.gradle b/build.gradle index d29319b3c..f2a195f57 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group = "org.hamcrest" -version = "3.0-SNAPSHOT" +version = "3.0" subprojects { apply plugin: 'checkstyle' diff --git a/docs/distributables.md b/docs/distributables.md index 8949e1028..daf06c2d4 100644 --- a/docs/distributables.md +++ b/docs/distributables.md @@ -30,18 +30,18 @@ when upgrading. ## The Hamcrest Jar All the base classes and standard matcher implementations are contained in a -single jar file called `hamcrest-2.2.jar`. +single jar file called `hamcrest-3.0.jar`. ### Using Hamcrest in a Gradle Project -Add `"org.hamcrest:hamcrest:2.2"` to the dependencies section of your +Add `"org.hamcrest:hamcrest:3.0"` to the dependencies section of your `build.gradle`, for example: ```gradle apply plugin: 'java' dependencies { - testImplementation 'org.hamcrest:hamcrest:2.2' + testImplementation 'org.hamcrest:hamcrest:3.0' } ``` @@ -56,7 +56,7 @@ Add the following to the `` section in your `pom.xml`: org.hamcrest hamcrest - 2.2 + 3.0 test ``` @@ -115,8 +115,8 @@ directly declare a dependency upon these shim jars to force the upgrade. apply plugin: 'java' dependencies { - testImplementation 'org.hamcrest:hamcrest:2.2' - testImplementation 'org.hamcrest:hamcrest-library:2.2' + testImplementation 'org.hamcrest:hamcrest:3.0' + testImplementation 'org.hamcrest:hamcrest-library:3.0' testImplementation 'junit:junit:4.13.2' } ``` @@ -132,13 +132,13 @@ dependencies, otherwise the older version will take precedence. org.hamcrest hamcrest - 2.2 + 3.0 test org.hamcrest hamcrest-library - 2.2 + 3.0 test diff --git a/docs/javadoc/3.0/allclasses-frame.html b/docs/javadoc/3.0/allclasses-frame.html new file mode 100644 index 000000000..fa66540e9 --- /dev/null +++ b/docs/javadoc/3.0/allclasses-frame.html @@ -0,0 +1,101 @@ + + + + + +All Classes (Hamcrest 3.0 API) + + + + +

All Classes

+ + + diff --git a/docs/javadoc/3.0/allclasses-noframe.html b/docs/javadoc/3.0/allclasses-noframe.html new file mode 100644 index 000000000..d5f1fadc1 --- /dev/null +++ b/docs/javadoc/3.0/allclasses-noframe.html @@ -0,0 +1,101 @@ + + + + + +All Classes (Hamcrest 3.0 API) + + + + +

All Classes

+ + + diff --git a/docs/javadoc/3.0/constant-values.html b/docs/javadoc/3.0/constant-values.html new file mode 100644 index 000000000..21c711c79 --- /dev/null +++ b/docs/javadoc/3.0/constant-values.html @@ -0,0 +1,121 @@ + + + + + +Constant Field Values (Hamcrest 3.0 API) + + + + + + + + + + +
+

Constant Field Values

+

Contents

+
+ + + + + + diff --git a/docs/javadoc/3.0/deprecated-list.html b/docs/javadoc/3.0/deprecated-list.html new file mode 100644 index 000000000..a76aa1337 --- /dev/null +++ b/docs/javadoc/3.0/deprecated-list.html @@ -0,0 +1,289 @@ + + + + + +Deprecated List (Hamcrest 3.0 API) + + + + + + + +
+ + + + + + + +
+ + +
+

Deprecated API

+

Contents

+ +
+
+ + + + + + + +
+ +
+ + + + + + + +
+ + + + diff --git a/docs/javadoc/3.0/help-doc.html b/docs/javadoc/3.0/help-doc.html new file mode 100644 index 000000000..f2adf56fc --- /dev/null +++ b/docs/javadoc/3.0/help-doc.html @@ -0,0 +1,222 @@ + + + + + +API Help (Hamcrest 3.0 API) + + + + + + + +
+ + + + + + + +
+ + +
+

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.
+
+
+
    +
  • +

    Overview

    +

    The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

    +
  • +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + + + +
+ + + + diff --git a/docs/javadoc/3.0/index-all.html b/docs/javadoc/3.0/index-all.html new file mode 100644 index 000000000..ab24f5162 --- /dev/null +++ b/docs/javadoc/3.0/index-all.html @@ -0,0 +1,2786 @@ + + + + + +Index (Hamcrest 3.0 API) + + + + + + + +
+ + + + + + + +
+ + +
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(Matcher<? super T>...) - Constructor for class org.hamcrest.core.AllOf
+
 
+
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(Matcher<? super T>...) - Constructor for class org.hamcrest.core.AnyOf
+
 
+
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<? 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<? 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<? 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<? 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.
+
+
anyOf(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 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
+
+
TODO: Finish Class Level Documentation.
+
+
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.
+
+
getString() - Method in class org.hamcrest.text.IsEqualCompressingWhiteSpace
+
 
+
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(Matcher<? super Integer>) - Static method in class org.hamcrest.Matchers
+
+
Creates a matcher of CharSequence that matches when a char sequence has the length + that satisfies the specified matcher.
+
+
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(String) - Constructor for class org.hamcrest.core.StringContains
+
 
+
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(String) - Constructor for class org.hamcrest.core.StringEndsWith
+
 
+
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(String) - Constructor for class org.hamcrest.core.StringStartsWith
+
 
+
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/3.0/index.html b/docs/javadoc/3.0/index.html new file mode 100644 index 000000000..32f5b6cd2 --- /dev/null +++ b/docs/javadoc/3.0/index.html @@ -0,0 +1,75 @@ + + + + + +Hamcrest 3.0 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/3.0/org/hamcrest/BaseDescription.html b/docs/javadoc/3.0/org/hamcrest/BaseDescription.html new file mode 100644 index 000000000..808caeb6a --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/BaseDescription.html @@ -0,0 +1,523 @@ + + + + + +BaseDescription (Hamcrest 3.0 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
        +
        Parameters:
        +
        text - the text to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + + + + + +
        +
      • +

        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
        +
        Parameters:
        +
        value - the object to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + + + +
        +
      • +

        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
        +
        Type Parameters:
        +
        T - the description type.
        +
        Parameters:
        +
        start - the prefix.
        +
        separator - the separator.
        +
        end - the suffix.
        +
        values - the values to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Type Parameters:
        +
        T - the description type.
        +
        Parameters:
        +
        start - the prefix.
        +
        separator - the separator.
        +
        end - the suffix.
        +
        values - the values to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Parameters:
        +
        start - the prefix.
        +
        separator - the separator.
        +
        end - the suffix.
        +
        values - the values to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Parameters:
        +
        str - the string to append.
        +
        +
      • +
      + + + +
        +
      • +

        append

        +
        protected abstract void append(char c)
        +
        Append the char c to the description.
        +
        +
        Parameters:
        +
        c - the char to append.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/BaseMatcher.html b/docs/javadoc/3.0/org/hamcrest/BaseMatcher.html new file mode 100644 index 000000000..daf54cad9 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/BaseMatcher.html @@ -0,0 +1,382 @@ + + + + + +BaseMatcher (Hamcrest 3.0 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/3.0/org/hamcrest/Condition.Step.html b/docs/javadoc/3.0/org/hamcrest/Condition.Step.html new file mode 100644 index 000000000..15bdfc14e --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/Condition.Step.html @@ -0,0 +1,226 @@ + + + + + +Condition.Step (Hamcrest 3.0 API) + + + + + + + + + + + +
+
org.hamcrest
+

Interface Condition.Step<I,O>

+
+
+
+
    +
  • +
    +
    Enclosing class:
    +
    Condition<T>
    +
    +
    +
    +
    public static interface Condition.Step<I,O>
    +
  • +
+
+
+ +
+
+ +
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/Condition.html b/docs/javadoc/3.0/org/hamcrest/Condition.html new file mode 100644 index 000000000..86a24ee6e --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/Condition.html @@ -0,0 +1,366 @@ + + + + + +Condition (Hamcrest 3.0 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/3.0/org/hamcrest/CoreMatchers.html b/docs/javadoc/3.0/org/hamcrest/CoreMatchers.html new file mode 100644 index 000000000..5d609472e --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/CoreMatchers.html @@ -0,0 +1,1252 @@ + + + + + +CoreMatchers (Hamcrest 3.0 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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matchers - all the matchers must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matchers - all the matchers must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matchers - any the matchers must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matchers - any the matchers must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        LHS - the matcher type.
        +
        Parameters:
        +
        matcher - the matcher to combine, and both musth pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        LHS - the matcher type.
        +
        Parameters:
        +
        matcher - the matcher to combine, and either must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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())
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        description - the new description for the wrapped matcher
        +
        matcher - the matcher to wrap
        +
        values - optional values to insert into the tokenised description
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        U - the matcher type.
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to every item provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matcher - the matcher Is.is(org.hamcrest.Matcher<T>).
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value for matcher Is.is(org.hamcrest.Matcher<T>).
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - the type for matcher Is.isA(java.lang.Class<?>).
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        anything

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

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        item - the item to compare against the items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        itemMatchers - the matchers to apply to items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        items - the items to compare against the items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"}));
        + 
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        operand - for matcher IsEqual.equalTo(T).
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Parameters:
        +
        operand - the object for matcher IsEqual.equalToObject(java.lang.Object).
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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(), any(Canoe.class));
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - the type for matcher IsInstanceOf.any(java.lang.Class<T>).
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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));
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - the type for matcher IsInstanceOf.instanceOf(java.lang.Class<?>).
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matcher - the matcher whose sense should be inverted
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value that any examined object should not equal
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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())))
        +
        +
        Returns:
        +
        The 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))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - dummy parameter used to infer the generic type of the returned matcher
        +
        Returns:
        +
        The 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())
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - dummy parameter used to infer the generic type of the returned matcher
        +
        Returns:
        +
        The 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.
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        target - the target instance against which others should be assessed
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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.
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        target - the target instance against which others should be assessed
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/CustomMatcher.html b/docs/javadoc/3.0/org/hamcrest/CustomMatcher.html new file mode 100644 index 000000000..259dc0a27 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/CustomMatcher.html @@ -0,0 +1,323 @@ + + + + + +CustomMatcher (Hamcrest 3.0 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 + 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/3.0/org/hamcrest/CustomTypeSafeMatcher.html b/docs/javadoc/3.0/org/hamcrest/CustomTypeSafeMatcher.html new file mode 100644 index 000000000..dcd3e29df --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/CustomTypeSafeMatcher.html @@ -0,0 +1,325 @@ + + + + + +CustomTypeSafeMatcher (Hamcrest 3.0 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 + 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 + 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/3.0/org/hamcrest/Description.NullDescription.html b/docs/javadoc/3.0/org/hamcrest/Description.NullDescription.html new file mode 100644 index 000000000..c3834bb8e --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/Description.NullDescription.html @@ -0,0 +1,496 @@ + + + + + +Description.NullDescription (Hamcrest 3.0 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
        +
        Parameters:
        +
        start - the prefix.
        +
        separator - the separator.
        +
        end - the suffix.
        +
        values - the values to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Parameters:
        +
        text - the text to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Parameters:
        +
        value - the object to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + + + +
        +
      • +

        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
        +
        Type Parameters:
        +
        T - the description type.
        +
        Parameters:
        +
        start - the prefix.
        +
        separator - the separator.
        +
        end - the suffix.
        +
        values - the values to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Type Parameters:
        +
        T - the description type.
        +
        Parameters:
        +
        start - the prefix.
        +
        separator - the separator.
        +
        end - the suffix.
        +
        values - the values to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/Description.html b/docs/javadoc/3.0/org/hamcrest/Description.html new file mode 100644 index 000000000..e7c001148 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/Description.html @@ -0,0 +1,440 @@ + + + + + +Description (Hamcrest 3.0 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.
        +
        +
        Parameters:
        +
        text - the text to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + +
        +
      • +

        appendDescriptionOf

        +
        Description appendDescriptionOf(SelfDescribing value)
        +
        Appends the description of a SelfDescribing value to this description.
        +
        +
        Parameters:
        +
        value - the value to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + +
        +
      • +

        appendValue

        +
        Description appendValue(java.lang.Object value)
        +
        Appends an arbitrary value to the description.
        +
        +
        Parameters:
        +
        value - the object to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + + + +
        +
      • +

        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.
        +
        +
        Type Parameters:
        +
        T - the description type.
        +
        Parameters:
        +
        start - the prefix.
        +
        separator - the separator.
        +
        end - the suffix.
        +
        values - the values to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Type Parameters:
        +
        T - the description type.
        +
        Parameters:
        +
        start - the prefix.
        +
        separator - the separator.
        +
        end - the suffix.
        +
        values - the values to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Parameters:
        +
        start - the prefix.
        +
        separator - the separator.
        +
        end - the suffix.
        +
        values - the values to append.
        +
        Returns:
        +
        the update description when displaying the matcher error.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/DiagnosingMatcher.html b/docs/javadoc/3.0/org/hamcrest/DiagnosingMatcher.html new file mode 100644 index 000000000..19e4c401b --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/DiagnosingMatcher.html @@ -0,0 +1,364 @@ + + + + + +DiagnosingMatcher (Hamcrest 3.0 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/3.0/org/hamcrest/FeatureMatcher.html b/docs/javadoc/3.0/org/hamcrest/FeatureMatcher.html new file mode 100644 index 000000000..5c1414fdd --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/FeatureMatcher.html @@ -0,0 +1,385 @@ + + + + + +FeatureMatcher (Hamcrest 3.0 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
        +
        +
      • +
      + + + + + +
        +
      • +

        matchesSafely

        +
        protected boolean matchesSafely(T actual,
        +                                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<T>
        +
        Parameters:
        +
        actual - the item.
        +
        mismatch - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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 + 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/3.0/org/hamcrest/Matcher.html b/docs/javadoc/3.0/org/hamcrest/Matcher.html new file mode 100644 index 000000000..61fb058ab --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/Matcher.html @@ -0,0 +1,327 @@ + + + + + +Matcher (Hamcrest 3.0 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/3.0/org/hamcrest/MatcherAssert.html b/docs/javadoc/3.0/org/hamcrest/MatcherAssert.html new file mode 100644 index 000000000..55a0be9e2 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/MatcherAssert.html @@ -0,0 +1,306 @@ + + + + + +MatcherAssert (Hamcrest 3.0 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/3.0/org/hamcrest/Matchers.html b/docs/javadoc/3.0/org/hamcrest/Matchers.html new file mode 100644 index 000000000..b4860af7a --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/Matchers.html @@ -0,0 +1,4045 @@ + + + + + +Matchers (Hamcrest 3.0 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<? super 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<? super 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<? 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 ANY of the specified matchers.
      +
      static <T> AnyOf<T>anyOf(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 ANY of the specified matchers.
      +
      static <T> AnyOf<T>anyOf(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 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 Matcher<java.lang.CharSequence>hasLength(Matcher<? super java.lang.Integer> lengthMatcher) +
      Creates a matcher of CharSequence that matches when a char sequence has the length + that satisfies the specified matcher.
      +
      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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matchers - all the matchers must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matchers - all the matchers must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        first - first matcher that must pass.
        +
        second - second matcher that must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        first - first matcher that must pass.
        +
        second - second matcher that must pass.
        +
        third - third matcher that must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        first - first matcher that must pass.
        +
        second - second matcher that must pass.
        +
        third - third matcher that must pass.
        +
        fourth - fourth matcher that must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        first - first matcher that must pass.
        +
        second - second matcher that must pass.
        +
        third - third matcher that must pass.
        +
        fourth - fourth matcher that must pass.
        +
        fifth - fifth matcher that must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        first - first matcher that must pass.
        +
        second - second matcher that must pass.
        +
        third - third matcher that must pass.
        +
        fourth - fourth matcher that must pass.
        +
        fifth - fifth matcher that must pass.
        +
        sixth - sixth matcher that must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matchers - any the matchers must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matchers - any the matchers must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(Matcher<? super 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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        first - first matcher to check.
        +
        second - second matcher to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(Matcher<? super 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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        first - first matcher to check.
        +
        second - second matcher to check.
        +
        third - third matcher to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(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 ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        first - first matcher to check.
        +
        second - second matcher to check.
        +
        third - third matcher to check.
        +
        fourth - fourth matcher to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(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 ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        first - first matcher to check.
        +
        second - second matcher to check.
        +
        third - third matcher to check.
        +
        fourth - fourth matcher to check.
        +
        fifth - fifth matcher to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        anyOf

        +
        public static <T> AnyOf<T> anyOf(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 ANY of the specified matchers. + For example: +
        assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        first - first matcher to check.
        +
        second - second matcher to check.
        +
        third - third matcher to check.
        +
        fourth - fourth matcher to check.
        +
        fifth - fifth matcher to check.
        +
        sixth - sixth matcher to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        LHS - the matcher type.
        +
        Parameters:
        +
        matcher - the matcher to combine, and both must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        LHS - the matcher type.
        +
        Parameters:
        +
        matcher - the matcher to combine, and either must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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())
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        description - the new description for the wrapped matcher
        +
        matcher - the matcher to wrap
        +
        values - optional values to insert into the tokenized description
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        U - the matcher type.
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to every item provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matcher - the matcher to wrap.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - the type to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        anything

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

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        item - the item to compare against the items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        itemMatchers - the matchers to apply to items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        items - the items to compare against the items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"}));
        + 
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        operand - the value to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Parameters:
        +
        operand - the value to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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));
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - the type to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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));
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - the type to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matcher - the matcher whose sense should be inverted
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value that any examined object should not equal
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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())))
        +
        +
        Returns:
        +
        The 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))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - dummy parameter used to infer the generic type of the returned matcher
        +
        Returns:
        +
        The 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())
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - dummy parameter used to infer the generic type of the returned matcher
        +
        Returns:
        +
        The 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.
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        target - the target instance against which others should be assessed
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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.
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        target - the target instance against which others should be assessed
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        elementMatchers - the matchers that the elements of examined arrays should satisfy
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        elementMatcher - the matcher to apply to elements in examined arrays
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        element - the element that should be present in examined arrays
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        items - the items that must equal the items within an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items in the examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by the corresponding item in an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an entry in an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        items - the items that must equal the entries of an examined array, in any order
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        sizeMatcher - a matcher for the length of an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        size - the length that an examined array must have for a positive match
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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())
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        V - the map value type.
        +
        Parameters:
        +
        sizeMatcher - a matcher for the size of an examined Map
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        V - the map value type.
        +
        Parameters:
        +
        size - the expected size of an examined Map
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        V - the map value type.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        sizeMatcher - a matcher for the size of an examined Collection
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        size - the expected size of an examined Collection
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        unusedToForceReturnType - the type of the collection's content
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        unusedToForceReturnType - the type of the iterable's content
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        items - the items that must equal the items provided by an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatcher - the matcher that must be satisfied by the single item provided by an + examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items provided by an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by the corresponding item provided by + an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        items - the items that must equal the items provided by an examined Iterable in any order
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        items - the items that must be contained within items provided by an examined Iterable in the same relative order
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items provided by an examined Iterable in the same relative order
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        sizeMatcher - a matcher for the number of items that should be yielded by an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        size - the number of items that should be yielded by an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        V - the map value type.
        +
        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        V - the map value type.
        +
        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        Parameters:
        +
        keyMatcher - the matcher that must be satisfied by at least one key
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        Parameters:
        +
        key - the key that satisfying maps must contain
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        V - the value type.
        +
        Parameters:
        +
        valueMatcher - the matcher that must be satisfied by at least one value
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        V - the value type.
        +
        Parameters:
        +
        value - the value that satisfying maps must contain
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        collection - the collection in which matching items must be found
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"})))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        elements - the array in which matching items must be found
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        collection - the collection in which matching items must be found
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"}))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        elements - the array in which matching items must be found
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        elements - the elements amongst which matching items will be found
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        elements - the elements amongst which matching items will be found
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return zero
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return greater + than zero
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return greater + than or equal to zero
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return less + than zero
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return less + than or equal to zero
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        equalToIgnoringWhiteSpace

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

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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())
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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())
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Parameters:
        +
        pattern - the text pattern to match.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Parameters:
        +
        regex - the regex to match.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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 length + that satisfies the specified matcher. + For example: + +
        + assertThat("text", hasLength(lessThan(4)))
        + 
        +
        +
        Parameters:
        +
        lengthMatcher - a matcher for the expected length of the string
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        toStringMatcher - the matcher used to verify the toString result
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        expectedToString - the expected toString result
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        baseType - the base class to examine classes against
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        propertyName - the name of the JavaBean property that examined beans should possess
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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")
        +
        +
        Type Parameters:
        +
        B - the matcher type.
        +
        Parameters:
        +
        expectedBean - the bean against which examined beans are compared
        +
        ignoredProperties - do not check any of these named properties.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/SelfDescribing.html b/docs/javadoc/3.0/org/hamcrest/SelfDescribing.html new file mode 100644 index 000000000..45f3b1d7b --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/SelfDescribing.html @@ -0,0 +1,236 @@ + + + + + +SelfDescribing (Hamcrest 3.0 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 + 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/3.0/org/hamcrest/StringDescription.html b/docs/javadoc/3.0/org/hamcrest/StringDescription.html new file mode 100644 index 000000000..0ff21feb4 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/StringDescription.html @@ -0,0 +1,426 @@ + + + + + +StringDescription (Hamcrest 3.0 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.
        +
        +
      • +
      + + + +
        +
      • +

        asString

        +
        public static java.lang.String asString(SelfDescribing selfDescribing)
        + +
        +
        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
        +
        Parameters:
        +
        str - the string to append.
        +
        +
      • +
      + + + +
        +
      • +

        append

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

        toString

        +
        public java.lang.String toString()
        +
        Returns the description as a string.
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/TypeSafeDiagnosingMatcher.html b/docs/javadoc/3.0/org/hamcrest/TypeSafeDiagnosingMatcher.html new file mode 100644 index 000000000..c431106da --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/TypeSafeDiagnosingMatcher.html @@ -0,0 +1,429 @@ + + + + + +TypeSafeDiagnosingMatcher (Hamcrest 3.0 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.
        +
        +
        Parameters:
        +
        item - the item.
        +
        mismatchDescription - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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/3.0/org/hamcrest/TypeSafeMatcher.html b/docs/javadoc/3.0/org/hamcrest/TypeSafeMatcher.html new file mode 100644 index 000000000..e5090a917 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/TypeSafeMatcher.html @@ -0,0 +1,446 @@ + + + + + +TypeSafeMatcher (Hamcrest 3.0 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.
        +
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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.
        +
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        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 type safe item to match against.
        +
        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/3.0/org/hamcrest/beans/HasProperty.html b/docs/javadoc/3.0/org/hamcrest/beans/HasProperty.html new file mode 100644 index 000000000..f32c07921 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/beans/HasProperty.html @@ -0,0 +1,394 @@ + + + + + +HasProperty (Hamcrest 3.0 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>
        +
        Parameters:
        +
        obj - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        propertyName - the name of the JavaBean property that examined beans should possess
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/beans/HasPropertyWithValue.html b/docs/javadoc/3.0/org/hamcrest/beans/HasPropertyWithValue.html new file mode 100644 index 000000000..e0ac5b6e3 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/beans/HasPropertyWithValue.html @@ -0,0 +1,467 @@ + + + + + +HasPropertyWithValue (Hamcrest 3.0 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

      + + + + + +
        +
      • +

        matchesSafely

        +
        public boolean matchesSafely(T bean,
        +                             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<T>
        +
        Parameters:
        +
        bean - the item.
        +
        mismatch - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/beans/PropertyUtil.html b/docs/javadoc/3.0/org/hamcrest/beans/PropertyUtil.html new file mode 100644 index 000000000..a2b8de694 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/beans/PropertyUtil.html @@ -0,0 +1,356 @@ + + + + + +PropertyUtil (Hamcrest 3.0 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.
        +
        +
        Parameters:
        +
        propertyName - the bean property name.
        +
        fromObj - the object to check.
        +
        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/3.0/org/hamcrest/beans/SamePropertyValuesAs.html b/docs/javadoc/3.0/org/hamcrest/beans/SamePropertyValuesAs.html new file mode 100644 index 000000000..99bb1adac --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/beans/SamePropertyValuesAs.html @@ -0,0 +1,367 @@ + + + + + +SamePropertyValuesAs (Hamcrest 3.0 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 + 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")
        +
        +
        Type Parameters:
        +
        B - the matcher type.
        +
        Parameters:
        +
        expectedBean - the bean against which examined beans are compared
        +
        ignoredProperties - do not check any of these named properties.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/beans/package-frame.html b/docs/javadoc/3.0/org/hamcrest/beans/package-frame.html new file mode 100644 index 000000000..71c2091d3 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/beans/package-frame.html @@ -0,0 +1,22 @@ + + + + + +org.hamcrest.beans (Hamcrest 3.0 API) + + + + +

org.hamcrest.beans

+ + + diff --git a/docs/javadoc/3.0/org/hamcrest/beans/package-summary.html b/docs/javadoc/3.0/org/hamcrest/beans/package-summary.html new file mode 100644 index 000000000..dce946d28 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/beans/package-summary.html @@ -0,0 +1,168 @@ + + + + + +org.hamcrest.beans (Hamcrest 3.0 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/3.0/org/hamcrest/beans/package-tree.html b/docs/javadoc/3.0/org/hamcrest/beans/package-tree.html new file mode 100644 index 000000000..957725b6f --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/beans/package-tree.html @@ -0,0 +1,153 @@ + + + + + +org.hamcrest.beans Class Hierarchy (Hamcrest 3.0 API) + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.beans

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/ArrayAsIterableMatcher.html b/docs/javadoc/3.0/org/hamcrest/collection/ArrayAsIterableMatcher.html new file mode 100644 index 000000000..e9a1ff03f --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/ArrayAsIterableMatcher.html @@ -0,0 +1,416 @@ + + + + + +ArrayAsIterableMatcher (Hamcrest 3.0 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[]>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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[]>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/ArrayMatching.html b/docs/javadoc/3.0/org/hamcrest/collection/ArrayMatching.html new file mode 100644 index 000000000..031976793 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/ArrayMatching.html @@ -0,0 +1,541 @@ + + + + + +ArrayMatching (Hamcrest 3.0 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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        elementMatcher - the matcher to apply to elements in examined arrays
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        element - the element that should be present in examined arrays
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an entry in an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        items - the items that must equal the entries of an examined array, in any order
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        items - the items that must equal the items within an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items in the examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by the corresponding item in an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        asEqualMatchers

        +
        public static <E> java.util.List<Matcher<? super E>> asEqualMatchers(E[] items)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/HasItemInArray.html b/docs/javadoc/3.0/org/hamcrest/collection/HasItemInArray.html new file mode 100644 index 000000000..ab67b7f43 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/HasItemInArray.html @@ -0,0 +1,364 @@ + + + + + +HasItemInArray (Hamcrest 3.0 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[]>
        +
        Parameters:
        +
        actual - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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[]>
        +
        Parameters:
        +
        actual - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsArray.html b/docs/javadoc/3.0/org/hamcrest/collection/IsArray.html new file mode 100644 index 000000000..42ca9bb9b --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsArray.html @@ -0,0 +1,462 @@ + + + + + +IsArray (Hamcrest 3.0 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[]>
        +
        Parameters:
        +
        array - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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[]>
        +
        Parameters:
        +
        actual - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Returns:
        +
        The description prefix.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Returns:
        +
        The description separator.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Returns:
        +
        The description suffix.
        +
        +
      • +
      + + + +
        +
      • +

        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))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        elementMatchers - the matchers that the elements of examined arrays should satisfy
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsArrayContainingInAnyOrder.html b/docs/javadoc/3.0/org/hamcrest/collection/IsArrayContainingInAnyOrder.html new file mode 100644 index 000000000..a69d6bd77 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsArrayContainingInAnyOrder.html @@ -0,0 +1,489 @@ + + + + + +IsArrayContainingInAnyOrder (Hamcrest 3.0 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[]>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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[]>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        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 + 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")))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an entry in an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        items - the items that must equal the entries of an examined array, in any order
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsArrayContainingInOrder.html b/docs/javadoc/3.0/org/hamcrest/collection/IsArrayContainingInOrder.html new file mode 100644 index 000000000..74260bf5b --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsArrayContainingInOrder.html @@ -0,0 +1,473 @@ + + + + + +IsArrayContainingInOrder (Hamcrest 3.0 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[]>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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[]>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        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 + 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"))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        items - the items that must equal the items within an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items in the examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by the corresponding item in an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsArrayWithSize.html b/docs/javadoc/3.0/org/hamcrest/collection/IsArrayWithSize.html new file mode 100644 index 000000000..923fde6ee --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsArrayWithSize.html @@ -0,0 +1,405 @@ + + + + + +IsArrayWithSize (Hamcrest 3.0 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)))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        sizeMatcher - a matcher for the length of an examined array
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        size - the length that an examined array must have for a positive match
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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())
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsCollectionWithSize.html b/docs/javadoc/3.0/org/hamcrest/collection/IsCollectionWithSize.html new file mode 100644 index 000000000..191c2ea98 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsCollectionWithSize.html @@ -0,0 +1,377 @@ + + + + + +IsCollectionWithSize (Hamcrest 3.0 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)))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        sizeMatcher - a matcher for the size of an examined Collection
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        size - the expected size of an examined Collection
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsEmptyCollection.html b/docs/javadoc/3.0/org/hamcrest/collection/IsEmptyCollection.html new file mode 100644 index 000000000..d6a1caa54 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsEmptyCollection.html @@ -0,0 +1,414 @@ + + + + + +IsEmptyCollection (Hamcrest 3.0 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>>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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>>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        unusedToForceReturnType - the type of the collection's content
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsEmptyIterable.html b/docs/javadoc/3.0/org/hamcrest/collection/IsEmptyIterable.html new file mode 100644 index 000000000..07d2b3771 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsEmptyIterable.html @@ -0,0 +1,410 @@ + + + + + +IsEmptyIterable (Hamcrest 3.0 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>>
        +
        Parameters:
        +
        iterable - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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>>
        +
        Parameters:
        +
        iter - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        unusedToForceReturnType - the type of the iterable's content
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsIn.html b/docs/javadoc/3.0/org/hamcrest/collection/IsIn.html new file mode 100644 index 000000000..1acdbb902 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsIn.html @@ -0,0 +1,525 @@ + + + + + +IsIn (Hamcrest 3.0 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 + 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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        collection - the collection in which matching items must be found
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        collection - the collection in which matching items must be found
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"}))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        elements - the array in which matching items must be found
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"})))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        elements - the array in which matching items must be found
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        elements - the elements amongst which matching items will be found
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        elements - the elements amongst which matching items will be found
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsIterableContainingInAnyOrder.html b/docs/javadoc/3.0/org/hamcrest/collection/IsIterableContainingInAnyOrder.html new file mode 100644 index 000000000..53d2741bb --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsIterableContainingInAnyOrder.html @@ -0,0 +1,460 @@ + + + + + +IsIterableContainingInAnyOrder (Hamcrest 3.0 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>>
        +
        Parameters:
        +
        items - the item.
        +
        mismatchDescription - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        items - the items that must equal the items provided by an examined Iterable in any order
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by an item provided by an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsIterableContainingInOrder.html b/docs/javadoc/3.0/org/hamcrest/collection/IsIterableContainingInOrder.html new file mode 100644 index 000000000..952df8566 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsIterableContainingInOrder.html @@ -0,0 +1,463 @@ + + + + + +IsIterableContainingInOrder (Hamcrest 3.0 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>>
        +
        Parameters:
        +
        iterable - the item.
        +
        mismatchDescription - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        items - the items that must equal the items provided by an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatcher - the matcher that must be satisfied by the single item provided by an + examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items provided by an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - a list of matchers, each of which must be satisfied by the corresponding item provided by + an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsIterableContainingInRelativeOrder.html b/docs/javadoc/3.0/org/hamcrest/collection/IsIterableContainingInRelativeOrder.html new file mode 100644 index 000000000..e271b9b89 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsIterableContainingInRelativeOrder.html @@ -0,0 +1,431 @@ + + + + + +IsIterableContainingInRelativeOrder (Hamcrest 3.0 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>>
        +
        Parameters:
        +
        iterable - the item.
        +
        mismatchDescription - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        items - the items that must be contained within items provided by an examined Iterable in the same relative order
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        itemMatchers - the matchers that must be satisfied by the items provided by an examined Iterable in the same relative order
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsIterableWithSize.html b/docs/javadoc/3.0/org/hamcrest/collection/IsIterableWithSize.html new file mode 100644 index 000000000..47b97ff89 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsIterableWithSize.html @@ -0,0 +1,380 @@ + + + + + +IsIterableWithSize (Hamcrest 3.0 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)))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        sizeMatcher - a matcher for the number of items that should be yielded by an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        E - the matcher type.
        +
        Parameters:
        +
        size - the number of items that should be yielded by an examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsMapContaining.html b/docs/javadoc/3.0/org/hamcrest/collection/IsMapContaining.html new file mode 100644 index 000000000..e66e70454 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsMapContaining.html @@ -0,0 +1,547 @@ + + + + + +IsMapContaining (Hamcrest 3.0 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>>
        +
        Parameters:
        +
        map - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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>>
        +
        Parameters:
        +
        map - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        V - the map value type.
        +
        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        V - the map value type.
        +
        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        Parameters:
        +
        keyMatcher - the matcher that must be satisfied by at least one key
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        Parameters:
        +
        key - the key that satisfying maps must contain
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        V - the value type.
        +
        Parameters:
        +
        valueMatcher - the matcher that must be satisfied by at least one value
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        V - the value type.
        +
        Parameters:
        +
        value - the value that satisfying maps must contain
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/IsMapWithSize.html b/docs/javadoc/3.0/org/hamcrest/collection/IsMapWithSize.html new file mode 100644 index 000000000..d1c3eaf93 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/IsMapWithSize.html @@ -0,0 +1,406 @@ + + + + + +IsMapWithSize (Hamcrest 3.0 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))))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        V - the map value type.
        +
        Parameters:
        +
        sizeMatcher - a matcher for the size of an examined Map
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        V - the map value type.
        +
        Parameters:
        +
        size - the expected size of an examined Map
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Type Parameters:
        +
        K - the map key type.
        +
        V - the map value type.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/package-frame.html b/docs/javadoc/3.0/org/hamcrest/collection/package-frame.html new file mode 100644 index 000000000..c4d816ff1 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/package-frame.html @@ -0,0 +1,35 @@ + + + + + +org.hamcrest.collection (Hamcrest 3.0 API) + + + + +

org.hamcrest.collection

+ + + diff --git a/docs/javadoc/3.0/org/hamcrest/collection/package-summary.html b/docs/javadoc/3.0/org/hamcrest/collection/package-summary.html new file mode 100644 index 000000000..8be36d4ae --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/package-summary.html @@ -0,0 +1,230 @@ + + + + + +org.hamcrest.collection (Hamcrest 3.0 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/3.0/org/hamcrest/collection/package-tree.html b/docs/javadoc/3.0/org/hamcrest/collection/package-tree.html new file mode 100644 index 000000000..802819780 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/collection/package-tree.html @@ -0,0 +1,166 @@ + + + + + +org.hamcrest.collection Class Hierarchy (Hamcrest 3.0 API) + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.collection

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/comparator/ComparatorMatcherBuilder.html b/docs/javadoc/3.0/org/hamcrest/comparator/ComparatorMatcherBuilder.html new file mode 100644 index 000000000..ce3b886f2 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/comparator/ComparatorMatcherBuilder.html @@ -0,0 +1,429 @@ + + + + + +ComparatorMatcherBuilder (Hamcrest 3.0 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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        comparator - the comparator for the matcher to use.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/comparator/package-frame.html b/docs/javadoc/3.0/org/hamcrest/comparator/package-frame.html new file mode 100644 index 000000000..a50beb963 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/comparator/package-frame.html @@ -0,0 +1,19 @@ + + + + + +org.hamcrest.comparator (Hamcrest 3.0 API) + + + + +

org.hamcrest.comparator

+
+

Classes

+ +
+ + diff --git a/docs/javadoc/3.0/org/hamcrest/comparator/package-summary.html b/docs/javadoc/3.0/org/hamcrest/comparator/package-summary.html new file mode 100644 index 000000000..ac702d9fd --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/comparator/package-summary.html @@ -0,0 +1,139 @@ + + + + + +org.hamcrest.comparator (Hamcrest 3.0 API) + + + + + + + + + + +
+

Package org.hamcrest.comparator

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

Hierarchy For Package org.hamcrest.comparator

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/AllOf.html b/docs/javadoc/3.0/org/hamcrest/core/AllOf.html new file mode 100644 index 000000000..4e2410137 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/AllOf.html @@ -0,0 +1,393 @@ + + + + + +AllOf (Hamcrest 3.0 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

        +
        @SafeVarargs
        +public AllOf(Matcher<? super T>... matchers)
        +
      • +
      + + + +
        +
      • +

        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 + 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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matchers - all the matchers must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matchers - all the matchers must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/AnyOf.html b/docs/javadoc/3.0/org/hamcrest/core/AnyOf.html new file mode 100644 index 000000000..15fddcbb5 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/AnyOf.html @@ -0,0 +1,426 @@ + + + + + +AnyOf (Hamcrest 3.0 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

        +
        @SafeVarargs
        +public AnyOf(Matcher<? super T>... matchers)
        +
      • +
      + + + +
        +
      • +

        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 + 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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matchers - any the matchers must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matchers - any the matchers must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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/3.0/org/hamcrest/core/CombinableMatcher.CombinableBothMatcher.html b/docs/javadoc/3.0/org/hamcrest/core/CombinableMatcher.CombinableBothMatcher.html new file mode 100644 index 000000000..d78e4298c --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/CombinableMatcher.CombinableBothMatcher.html @@ -0,0 +1,272 @@ + + + + + +CombinableMatcher.CombinableBothMatcher (Hamcrest 3.0 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/3.0/org/hamcrest/core/CombinableMatcher.CombinableEitherMatcher.html b/docs/javadoc/3.0/org/hamcrest/core/CombinableMatcher.CombinableEitherMatcher.html new file mode 100644 index 000000000..b4865ec53 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/CombinableMatcher.CombinableEitherMatcher.html @@ -0,0 +1,272 @@ + + + + + +CombinableMatcher.CombinableEitherMatcher (Hamcrest 3.0 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/3.0/org/hamcrest/core/CombinableMatcher.html b/docs/javadoc/3.0/org/hamcrest/core/CombinableMatcher.html new file mode 100644 index 000000000..a9b24bea4 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/CombinableMatcher.html @@ -0,0 +1,443 @@ + + + + + +CombinableMatcher (Hamcrest 3.0 API) + + + + + + + + + + + +
+
org.hamcrest.core
+

Class CombinableMatcher<T>

+
+
+ +
+
    +
  • +
    +
    Type Parameters:
    +
    T - the type of matcher being combined.
    +
    +
    +
    All Implemented Interfaces:
    +
    Matcher<T>, SelfDescribing
    +
    +
    +
    +
    public class CombinableMatcher<T>
    +extends TypeSafeDiagnosingMatcher<T>
    +
    TODO: Finish Class Level Documentation.
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CombinableMatcher

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

      Method Detail

      + + + + + +
        +
      • +

        matchesSafely

        +
        protected boolean matchesSafely(T 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<T>
        +
        Parameters:
        +
        item - the item.
        +
        mismatch - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        LHS - the matcher type.
        +
        Parameters:
        +
        matcher - the matcher to combine, and both must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        LHS - the matcher type.
        +
        Parameters:
        +
        matcher - the matcher to combine, and either must pass.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/DescribedAs.html b/docs/javadoc/3.0/org/hamcrest/core/DescribedAs.html new file mode 100644 index 000000000..903b331c5 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/DescribedAs.html @@ -0,0 +1,394 @@ + + + + + +DescribedAs (Hamcrest 3.0 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 + 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())
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        description - the new description for the wrapped matcher
        +
        matcher - the matcher to wrap
        +
        values - optional values to insert into the tokenised description
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/Every.html b/docs/javadoc/3.0/org/hamcrest/core/Every.html new file mode 100644 index 000000000..7686cac18 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/Every.html @@ -0,0 +1,365 @@ + + + + + +Every (Hamcrest 3.0 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>>
        +
        Parameters:
        +
        collection - the item.
        +
        mismatchDescription - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        U - the matcher type.
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to every item provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/Is.html b/docs/javadoc/3.0/org/hamcrest/core/Is.html new file mode 100644 index 000000000..ea4053900 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/Is.html @@ -0,0 +1,449 @@ + + + + + +Is (Hamcrest 3.0 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 + 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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matcher - the matcher to wrap.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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)))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - the type to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/IsAnything.html b/docs/javadoc/3.0/org/hamcrest/core/IsAnything.html new file mode 100644 index 000000000..91e1d6885 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/IsAnything.html @@ -0,0 +1,381 @@ + + + + + +IsAnything (Hamcrest 3.0 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 + 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.
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/IsCollectionContaining.html b/docs/javadoc/3.0/org/hamcrest/core/IsCollectionContaining.html new file mode 100644 index 000000000..2f4e416e5 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/IsCollectionContaining.html @@ -0,0 +1,480 @@ + + + + + +IsCollectionContaining (Hamcrest 3.0 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>>
        +
        Parameters:
        +
        collection - the item.
        +
        mismatchDescription - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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 + 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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        item - the item to compare against the items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        itemMatchers - the matchers to apply to items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        items - the items to compare against the items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/IsEqual.html b/docs/javadoc/3.0/org/hamcrest/core/IsEqual.html new file mode 100644 index 000000000..99586eb59 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/IsEqual.html @@ -0,0 +1,398 @@ + + + + + +IsEqual (Hamcrest 3.0 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 + 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"}));
        + 
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        operand - the value to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Parameters:
        +
        operand - the value to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/IsInstanceOf.html b/docs/javadoc/3.0/org/hamcrest/core/IsInstanceOf.html new file mode 100644 index 000000000..cf58357fa --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/IsInstanceOf.html @@ -0,0 +1,401 @@ + + + + + +IsInstanceOf (Hamcrest 3.0 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 + 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));
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - the type to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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));
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - the type to check.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/IsIterableContaining.html b/docs/javadoc/3.0/org/hamcrest/core/IsIterableContaining.html new file mode 100644 index 000000000..a946e850c --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/IsIterableContaining.html @@ -0,0 +1,465 @@ + + + + + +IsIterableContaining (Hamcrest 3.0 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>>
        +
        Parameters:
        +
        collection - the item.
        +
        mismatchDescription - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        itemMatcher - the matcher to apply to items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        item - the item to compare against the items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        itemMatchers - the matchers to apply to items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        items - the items to compare against the items provided by the examined Iterable
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/IsNot.html b/docs/javadoc/3.0/org/hamcrest/core/IsNot.html new file mode 100644 index 000000000..521fe4eb4 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/IsNot.html @@ -0,0 +1,383 @@ + + + + + +IsNot (Hamcrest 3.0 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 + 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))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        matcher - the matcher whose sense should be inverted
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value that any examined object should not equal
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/IsNull.html b/docs/javadoc/3.0/org/hamcrest/core/IsNull.html new file mode 100644 index 000000000..128b73e0f --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/IsNull.html @@ -0,0 +1,427 @@ + + + + + +IsNull (Hamcrest 3.0 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 + 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())
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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())))
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - dummy parameter used to infer the generic type of the returned matcher
        +
        Returns:
        +
        The 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))))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        type - dummy parameter used to infer the generic type of the returned matcher
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/IsSame.html b/docs/javadoc/3.0/org/hamcrest/core/IsSame.html new file mode 100644 index 000000000..fcd5a4e9b --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/IsSame.html @@ -0,0 +1,383 @@ + + + + + +IsSame (Hamcrest 3.0 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 + 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.
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        target - the target instance against which others should be assessed
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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.
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        target - the target instance against which others should be assessed
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/StringContains.html b/docs/javadoc/3.0/org/hamcrest/core/StringContains.html new file mode 100644 index 000000000..5332bc80b --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/StringContains.html @@ -0,0 +1,394 @@ + + + + + +StringContains (Hamcrest 3.0 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(java.lang.String substring)
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/StringEndsWith.html b/docs/javadoc/3.0/org/hamcrest/core/StringEndsWith.html new file mode 100644 index 000000000..7c7de6ba5 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/StringEndsWith.html @@ -0,0 +1,394 @@ + + + + + +StringEndsWith (Hamcrest 3.0 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(java.lang.String substring)
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/StringRegularExpression.html b/docs/javadoc/3.0/org/hamcrest/core/StringRegularExpression.html new file mode 100644 index 000000000..ab57de943 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/StringRegularExpression.html @@ -0,0 +1,389 @@ + + + + + +StringRegularExpression (Hamcrest 3.0 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 + 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>
        +
        Parameters:
        +
        actual - the item.
        +
        mismatchDescription - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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/3.0/org/hamcrest/core/StringStartsWith.html b/docs/javadoc/3.0/org/hamcrest/core/StringStartsWith.html new file mode 100644 index 000000000..fcf33e8f9 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/StringStartsWith.html @@ -0,0 +1,400 @@ + + + + + +StringStartsWith (Hamcrest 3.0 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(java.lang.String substring)
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/SubstringMatcher.html b/docs/javadoc/3.0/org/hamcrest/core/SubstringMatcher.html new file mode 100644 index 000000000..5fa46f502 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/SubstringMatcher.html @@ -0,0 +1,431 @@ + + + + + +SubstringMatcher (Hamcrest 3.0 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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        converted

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

        evalSubstringOf

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

org.hamcrest.core

+ + + diff --git a/docs/javadoc/3.0/org/hamcrest/core/package-summary.html b/docs/javadoc/3.0/org/hamcrest/core/package-summary.html new file mode 100644 index 000000000..3418dcfe7 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/package-summary.html @@ -0,0 +1,260 @@ + + + + + +org.hamcrest.core (Hamcrest 3.0 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/3.0/org/hamcrest/core/package-tree.html b/docs/javadoc/3.0/org/hamcrest/core/package-tree.html new file mode 100644 index 000000000..92ff6cc6f --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/core/package-tree.html @@ -0,0 +1,173 @@ + + + + + +org.hamcrest.core Class Hierarchy (Hamcrest 3.0 API) + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.core

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/internal/ArrayIterator.html b/docs/javadoc/3.0/org/hamcrest/internal/ArrayIterator.html new file mode 100644 index 000000000..18d0c0a19 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/internal/ArrayIterator.html @@ -0,0 +1,318 @@ + + + + + +ArrayIterator (Hamcrest 3.0 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/3.0/org/hamcrest/internal/NullSafety.html b/docs/javadoc/3.0/org/hamcrest/internal/NullSafety.html new file mode 100644 index 000000000..caf7c3d9b --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/internal/NullSafety.html @@ -0,0 +1,268 @@ + + + + + +NullSafety (Hamcrest 3.0 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/3.0/org/hamcrest/internal/ReflectiveTypeFinder.html b/docs/javadoc/3.0/org/hamcrest/internal/ReflectiveTypeFinder.html new file mode 100644 index 000000000..567a819d7 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/internal/ReflectiveTypeFinder.html @@ -0,0 +1,272 @@ + + + + + +ReflectiveTypeFinder (Hamcrest 3.0 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/3.0/org/hamcrest/internal/SelfDescribingValue.html b/docs/javadoc/3.0/org/hamcrest/internal/SelfDescribingValue.html new file mode 100644 index 000000000..e61a2e5e7 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/internal/SelfDescribingValue.html @@ -0,0 +1,287 @@ + + + + + +SelfDescribingValue (Hamcrest 3.0 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 + 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/3.0/org/hamcrest/internal/SelfDescribingValueIterator.html b/docs/javadoc/3.0/org/hamcrest/internal/SelfDescribingValueIterator.html new file mode 100644 index 000000000..140b80649 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/internal/SelfDescribingValueIterator.html @@ -0,0 +1,318 @@ + + + + + +SelfDescribingValueIterator (Hamcrest 3.0 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/3.0/org/hamcrest/internal/package-frame.html b/docs/javadoc/3.0/org/hamcrest/internal/package-frame.html new file mode 100644 index 000000000..50a86576e --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/internal/package-frame.html @@ -0,0 +1,23 @@ + + + + + +org.hamcrest.internal (Hamcrest 3.0 API) + + + + +

org.hamcrest.internal

+ + + diff --git a/docs/javadoc/3.0/org/hamcrest/internal/package-summary.html b/docs/javadoc/3.0/org/hamcrest/internal/package-summary.html new file mode 100644 index 000000000..431354079 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/internal/package-summary.html @@ -0,0 +1,155 @@ + + + + + +org.hamcrest.internal (Hamcrest 3.0 API) + + + + + + + + + + +
+

Package org.hamcrest.internal

+
+
+ +
+ + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/internal/package-tree.html b/docs/javadoc/3.0/org/hamcrest/internal/package-tree.html new file mode 100644 index 000000000..f70047700 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/internal/package-tree.html @@ -0,0 +1,138 @@ + + + + + +org.hamcrest.internal Class Hierarchy (Hamcrest 3.0 API) + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.internal

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/io/FileMatchers.FileStatus.html b/docs/javadoc/3.0/org/hamcrest/io/FileMatchers.FileStatus.html new file mode 100644 index 000000000..4a21ee6b0 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/io/FileMatchers.FileStatus.html @@ -0,0 +1,222 @@ + + + + + +FileMatchers.FileStatus (Hamcrest 3.0 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/3.0/org/hamcrest/io/FileMatchers.html b/docs/javadoc/3.0/org/hamcrest/io/FileMatchers.html new file mode 100644 index 000000000..5e98c9f08 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/io/FileMatchers.html @@ -0,0 +1,492 @@ + + + + + +FileMatchers (Hamcrest 3.0 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/3.0/org/hamcrest/io/package-frame.html b/docs/javadoc/3.0/org/hamcrest/io/package-frame.html new file mode 100644 index 000000000..5caee0279 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/io/package-frame.html @@ -0,0 +1,23 @@ + + + + + +org.hamcrest.io (Hamcrest 3.0 API) + + + + +

org.hamcrest.io

+
+

Interfaces

+ +

Classes

+ +
+ + diff --git a/docs/javadoc/3.0/org/hamcrest/io/package-summary.html b/docs/javadoc/3.0/org/hamcrest/io/package-summary.html new file mode 100644 index 000000000..349c35183 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/io/package-summary.html @@ -0,0 +1,154 @@ + + + + + +org.hamcrest.io (Hamcrest 3.0 API) + + + + + + + + + + +
+

Package org.hamcrest.io

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

Hierarchy For Package org.hamcrest.io

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/number/BigDecimalCloseTo.html b/docs/javadoc/3.0/org/hamcrest/number/BigDecimalCloseTo.html new file mode 100644 index 000000000..e70bb8e6c --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/number/BigDecimalCloseTo.html @@ -0,0 +1,391 @@ + + + + + +BigDecimalCloseTo (Hamcrest 3.0 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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/number/IsCloseTo.html b/docs/javadoc/3.0/org/hamcrest/number/IsCloseTo.html new file mode 100644 index 000000000..5a8873a90 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/number/IsCloseTo.html @@ -0,0 +1,392 @@ + + + + + +IsCloseTo (Hamcrest 3.0 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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/number/IsNaN.html b/docs/javadoc/3.0/org/hamcrest/number/IsNaN.html new file mode 100644 index 000000000..411b77cc4 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/number/IsNaN.html @@ -0,0 +1,348 @@ + + + + + +IsNaN (Hamcrest 3.0 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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/number/OrderingComparison.html b/docs/javadoc/3.0/org/hamcrest/number/OrderingComparison.html new file mode 100644 index 000000000..36adfe2c9 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/number/OrderingComparison.html @@ -0,0 +1,385 @@ + + + + + +OrderingComparison (Hamcrest 3.0 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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return zero
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return greater + than zero
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return greater + than or equal to zero
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return less + than zero
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        value - the value which, when passed to the compareTo method of the examined object, should return less + than or equal to zero
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/number/package-frame.html b/docs/javadoc/3.0/org/hamcrest/number/package-frame.html new file mode 100644 index 000000000..50bfdea4b --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/number/package-frame.html @@ -0,0 +1,22 @@ + + + + + +org.hamcrest.number (Hamcrest 3.0 API) + + + + +

org.hamcrest.number

+ + + diff --git a/docs/javadoc/3.0/org/hamcrest/number/package-summary.html b/docs/javadoc/3.0/org/hamcrest/number/package-summary.html new file mode 100644 index 000000000..a9caf2ec5 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/number/package-summary.html @@ -0,0 +1,165 @@ + + + + + +org.hamcrest.number (Hamcrest 3.0 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/3.0/org/hamcrest/number/package-tree.html b/docs/javadoc/3.0/org/hamcrest/number/package-tree.html new file mode 100644 index 000000000..0fc3009cf --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/number/package-tree.html @@ -0,0 +1,145 @@ + + + + + +org.hamcrest.number Class Hierarchy (Hamcrest 3.0 API) + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.number

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/object/HasEqualValues.html b/docs/javadoc/3.0/org/hamcrest/object/HasEqualValues.html new file mode 100644 index 000000000..f56120e00 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/object/HasEqualValues.html @@ -0,0 +1,339 @@ + + + + + +HasEqualValues (Hamcrest 3.0 API) + + + + + + + + + + + +
+
org.hamcrest.object
+

Class HasEqualValues<T>

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

      Constructor Detail

      + + + + + +
        +
      • +

        HasEqualValues

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

      Method Detail

      + + + + + +
        +
      • +

        matchesSafely

        +
        protected boolean matchesSafely(T 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<T>
        +
        Parameters:
        +
        item - the item.
        +
        mismatch - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/object/HasToString.html b/docs/javadoc/3.0/org/hamcrest/object/HasToString.html new file mode 100644 index 000000000..d918e1b8c --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/object/HasToString.html @@ -0,0 +1,378 @@ + + + + + +HasToString (Hamcrest 3.0 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")))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        toStringMatcher - the matcher used to verify the toString result
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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"))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        expectedToString - the expected toString result
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/object/IsCompatibleType.html b/docs/javadoc/3.0/org/hamcrest/object/IsCompatibleType.html new file mode 100644 index 000000000..3aa2dc597 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/object/IsCompatibleType.html @@ -0,0 +1,387 @@ + + + + + +IsCompatibleType (Hamcrest 3.0 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<?>>
        +
        Parameters:
        +
        cls - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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<?>>
        +
        Parameters:
        +
        cls - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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))
        +
        +
        Type Parameters:
        +
        T - the matcher type.
        +
        Parameters:
        +
        baseType - the base class to examine classes against
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/object/IsEventFrom.html b/docs/javadoc/3.0/org/hamcrest/object/IsEventFrom.html new file mode 100644 index 000000000..0715b9bfb --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/object/IsEventFrom.html @@ -0,0 +1,393 @@ + + + + + +IsEventFrom (Hamcrest 3.0 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>
        +
        Parameters:
        +
        item - the item.
        +
        mismatchDescription - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/object/package-frame.html b/docs/javadoc/3.0/org/hamcrest/object/package-frame.html new file mode 100644 index 000000000..5def76d16 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/object/package-frame.html @@ -0,0 +1,22 @@ + + + + + +org.hamcrest.object (Hamcrest 3.0 API) + + + + +

org.hamcrest.object

+ + + diff --git a/docs/javadoc/3.0/org/hamcrest/object/package-summary.html b/docs/javadoc/3.0/org/hamcrest/object/package-summary.html new file mode 100644 index 000000000..2e3d5ea26 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/object/package-summary.html @@ -0,0 +1,162 @@ + + + + + +org.hamcrest.object (Hamcrest 3.0 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/3.0/org/hamcrest/object/package-tree.html b/docs/javadoc/3.0/org/hamcrest/object/package-tree.html new file mode 100644 index 000000000..c0cae681c --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/object/package-tree.html @@ -0,0 +1,153 @@ + + + + + +org.hamcrest.object Class Hierarchy (Hamcrest 3.0 API) + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.object

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/package-frame.html b/docs/javadoc/3.0/org/hamcrest/package-frame.html new file mode 100644 index 000000000..fd6b45d07 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/package-frame.html @@ -0,0 +1,39 @@ + + + + + +org.hamcrest (Hamcrest 3.0 API) + + + + +

org.hamcrest

+ + + diff --git a/docs/javadoc/3.0/org/hamcrest/package-summary.html b/docs/javadoc/3.0/org/hamcrest/package-summary.html new file mode 100644 index 000000000..34f86a920 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/package-summary.html @@ -0,0 +1,246 @@ + + + + + +org.hamcrest (Hamcrest 3.0 API) + + + + + + + + + + +
+

Package org.hamcrest

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

Hierarchy For Package org.hamcrest

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/text/CharSequenceLength.html b/docs/javadoc/3.0/org/hamcrest/text/CharSequenceLength.html new file mode 100644 index 000000000..84ad066f8 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/text/CharSequenceLength.html @@ -0,0 +1,380 @@ + + + + + +CharSequenceLength (Hamcrest 3.0 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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/text/IsBlankString.html b/docs/javadoc/3.0/org/hamcrest/text/IsBlankString.html new file mode 100644 index 000000000..1b7550efa --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/text/IsBlankString.html @@ -0,0 +1,347 @@ + + + + + +IsBlankString (Hamcrest 3.0 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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/text/IsEmptyString.html b/docs/javadoc/3.0/org/hamcrest/text/IsEmptyString.html new file mode 100644 index 000000000..eb08b6eb9 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/text/IsEmptyString.html @@ -0,0 +1,398 @@ + + + + + +IsEmptyString (Hamcrest 3.0 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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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())
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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())
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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()))
        +
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/text/IsEqualCompressingWhiteSpace.html b/docs/javadoc/3.0/org/hamcrest/text/IsEqualCompressingWhiteSpace.html new file mode 100644 index 000000000..e9d9ab97d --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/text/IsEqualCompressingWhiteSpace.html @@ -0,0 +1,441 @@ + + + + + +IsEqualCompressingWhiteSpace (Hamcrest 3.0 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

      + + + +
        +
      • +

        getString

        +
        protected java.lang.String getString()
        +
      • +
      + + + +
        +
      • +

        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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/text/IsEqualIgnoringCase.html b/docs/javadoc/3.0/org/hamcrest/text/IsEqualIgnoringCase.html new file mode 100644 index 000000000..36a0d1d8c --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/text/IsEqualIgnoringCase.html @@ -0,0 +1,386 @@ + + + + + +IsEqualIgnoringCase (Hamcrest 3.0 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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/text/MatchesPattern.html b/docs/javadoc/3.0/org/hamcrest/text/MatchesPattern.html new file mode 100644 index 000000000..605869685 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/text/MatchesPattern.html @@ -0,0 +1,380 @@ + + + + + +MatchesPattern (Hamcrest 3.0 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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Parameters:
        +
        pattern - the text pattern to match.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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.
        +
        +
        Parameters:
        +
        regex - the regex to match.
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/text/StringContainsInOrder.html b/docs/javadoc/3.0/org/hamcrest/text/StringContainsInOrder.html new file mode 100644 index 000000000..71a7251e2 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/text/StringContainsInOrder.html @@ -0,0 +1,413 @@ + + + + + +StringContainsInOrder (Hamcrest 3.0 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>
        +
        Parameters:
        +
        s - the type safe item to match against.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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>
        +
        Parameters:
        +
        item - the type safe item to match against.
        +
        mismatchDescription - the mismatch description.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/text/package-frame.html b/docs/javadoc/3.0/org/hamcrest/text/package-frame.html new file mode 100644 index 000000000..396b5d448 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/text/package-frame.html @@ -0,0 +1,25 @@ + + + + + +org.hamcrest.text (Hamcrest 3.0 API) + + + + +

org.hamcrest.text

+ + + diff --git a/docs/javadoc/3.0/org/hamcrest/text/package-summary.html b/docs/javadoc/3.0/org/hamcrest/text/package-summary.html new file mode 100644 index 000000000..b44b5c791 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/text/package-summary.html @@ -0,0 +1,180 @@ + + + + + +org.hamcrest.text (Hamcrest 3.0 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/3.0/org/hamcrest/text/package-tree.html b/docs/javadoc/3.0/org/hamcrest/text/package-tree.html new file mode 100644 index 000000000..d5e5aed29 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/text/package-tree.html @@ -0,0 +1,156 @@ + + + + + +org.hamcrest.text Class Hierarchy (Hamcrest 3.0 API) + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.text

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/xml/HasXPath.html b/docs/javadoc/3.0/org/hamcrest/xml/HasXPath.html new file mode 100644 index 000000000..a77860dd5 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/xml/HasXPath.html @@ -0,0 +1,521 @@ + + + + + +HasXPath (Hamcrest 3.0 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>
        +
        Parameters:
        +
        item - the item.
        +
        mismatch - the mismatch description.
        +
        Returns:
        +
        boolean true/false depending if item matches matcher.
        +
        +
      • +
      + + + +
        +
      • +

        describeTo

        +
        public void describeTo(Description description)
        +
        Description copied from interface: SelfDescribing
        +
        Generates a description of the object. The description may be part of a + description of a larger object of which this is just a component, so it + should be worded appropriately.
        +
        +
        Parameters:
        +
        description - The description to be built or appended to.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      + + + +
        +
      • +

        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
        +
        Returns:
        +
        The matcher.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/javadoc/3.0/org/hamcrest/xml/package-frame.html b/docs/javadoc/3.0/org/hamcrest/xml/package-frame.html new file mode 100644 index 000000000..961013ca3 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/xml/package-frame.html @@ -0,0 +1,19 @@ + + + + + +org.hamcrest.xml (Hamcrest 3.0 API) + + + + +

org.hamcrest.xml

+
+

Classes

+ +
+ + diff --git a/docs/javadoc/3.0/org/hamcrest/xml/package-summary.html b/docs/javadoc/3.0/org/hamcrest/xml/package-summary.html new file mode 100644 index 000000000..7597f3965 --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/xml/package-summary.html @@ -0,0 +1,150 @@ + + + + + +org.hamcrest.xml (Hamcrest 3.0 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/3.0/org/hamcrest/xml/package-tree.html b/docs/javadoc/3.0/org/hamcrest/xml/package-tree.html new file mode 100644 index 000000000..a62008eec --- /dev/null +++ b/docs/javadoc/3.0/org/hamcrest/xml/package-tree.html @@ -0,0 +1,142 @@ + + + + + +org.hamcrest.xml Class Hierarchy (Hamcrest 3.0 API) + + + + + + + + + + +
+

Hierarchy For Package org.hamcrest.xml

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+ + + + + + diff --git a/docs/javadoc/3.0/overview-frame.html b/docs/javadoc/3.0/overview-frame.html new file mode 100644 index 000000000..63f1b6464 --- /dev/null +++ b/docs/javadoc/3.0/overview-frame.html @@ -0,0 +1,30 @@ + + + + + +Overview List (Hamcrest 3.0 API) + + + + + + +

 

+ + diff --git a/docs/javadoc/3.0/overview-summary.html b/docs/javadoc/3.0/overview-summary.html new file mode 100644 index 000000000..73df929b8 --- /dev/null +++ b/docs/javadoc/3.0/overview-summary.html @@ -0,0 +1,189 @@ + + + + + +Overview (Hamcrest 3.0 API) + + + + + + + +
+ + + + + + + +
+ + +
+

Hamcrest 3.0 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/3.0/overview-tree.html b/docs/javadoc/3.0/overview-tree.html new file mode 100644 index 000000000..2ed46d33e --- /dev/null +++ b/docs/javadoc/3.0/overview-tree.html @@ -0,0 +1,254 @@ + + + + + +Class Hierarchy (Hamcrest 3.0 API) + + + + + + + +
+ + + + + + + +
+ + + +
+

Class Hierarchy

+ +

Interface Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/docs/javadoc/3.0/package-list b/docs/javadoc/3.0/package-list new file mode 100644 index 000000000..37d7af536 --- /dev/null +++ b/docs/javadoc/3.0/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/3.0/script.js b/docs/javadoc/3.0/script.js new file mode 100644 index 000000000..b34635693 --- /dev/null +++ b/docs/javadoc/3.0/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/3.0/stylesheet.css b/docs/javadoc/3.0/stylesheet.css new file mode 100644 index 000000000..98055b22d --- /dev/null +++ b/docs/javadoc/3.0/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 a44f6a6e9..c12c7ea34 100644 --- a/docs/javadoc/index.html +++ b/docs/javadoc/index.html @@ -70,10 +70,11 @@

Matchers that can be combined to create flexible expressions of intent

API Reference Documentation (JavaDoc)

Lastest Version

Previous Versions