| 
 | ||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| Packages that use Factory | |
|---|---|
| org.hamcrest.beans | Matchers of Java Bean properties and their values. | 
| org.hamcrest.collection | Matchers of arrays and collections. | 
| org.hamcrest.core | Fundamental matchers of objects and values, and composite matchers. | 
| 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. | 
| Uses of Factory in org.hamcrest.beans | 
|---|
| Methods in org.hamcrest.beans with annotations of type Factory | ||
|---|---|---|
| static
 | HasProperty.hasProperty(java.lang.String propertyName)Creates a matcher that matches when the examined object has a JavaBean property with the specified name. | |
| static
 | HasPropertyWithValue.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
 | SamePropertyValuesAs.samePropertyValuesAs(T expectedBean)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. | |
| Uses of Factory in org.hamcrest.collection | 
|---|
| Methods in org.hamcrest.collection with annotations of type Factory | ||
|---|---|---|
| static
 | IsArray.array(Matcher<? super T>... elementMatchers)Creates a matcher that matches arrays whose elements are satisfied by the specified matchers. | |
| static
 | IsArrayContainingInOrder.arrayContaining(E... items)Creates a matcher for arrays that matcheswhen each item in the examined array is logically equal to the corresponding item in the specified items. | |
| static
 | IsArrayContainingInOrder.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
 | IsArrayContainingInOrder.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
 | IsArrayContainingInAnyOrder.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
 | IsArrayContainingInAnyOrder.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
 | IsArrayContainingInAnyOrder.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
 | IsArrayWithSize.arrayWithSize(int size)Creates a matcher for arrays that matches when the lengthof the array
 equals the specifiedsize. | |
| static
 | IsArrayWithSize.arrayWithSize(Matcher<? super java.lang.Integer> sizeMatcher)Creates a matcher for arrays that matches when the lengthof the array
 satisfies the specified matcher. | |
| static
 | IsIterableContainingInOrder.contains(E... items)Creates a matcher for Iterables that matches when a single pass over the
 examinedIterableyields a series of items, each logically equal to the
 corresponding item in the specified items. | |
| static
 | IsIterableContainingInOrder.contains(java.util.List<Matcher<? super E>> itemMatchers)Creates a matcher for Iterables that matches when a single pass over the
 examinedIterableyields a series of items, each satisfying the corresponding
 matcher in the specified list of matchers. | |
| static
 | IsIterableContainingInOrder.contains(Matcher<? super E>... itemMatchers)Creates a matcher for Iterables that matches when a single pass over the
 examinedIterableyields a series of items, each satisfying the corresponding
 matcher in the specified matchers. | |
| static
 | IsIterableContainingInOrder.contains(Matcher<? super E> itemMatcher)Creates a matcher for Iterables that matches when a single pass over the
 examinedIterableyields a single item that satisfies the specified matcher. | |
| static
 | IsIterableContainingInAnyOrder.containsInAnyOrder(java.util.Collection<Matcher<? super T>> itemMatchers)Creates an order agnostic matcher for Iterables that matches when a single pass over
 the examinedIterableyields a series of items, each satisfying one matcher anywhere
 in the specified collection of matchers. | |
| static
 | IsIterableContainingInAnyOrder.containsInAnyOrder(Matcher<? super E> itemMatcher)Deprecated. use contains(Matcher super E> itemMatcher) instead | |
| static
 | IsIterableContainingInAnyOrder.containsInAnyOrder(Matcher<? super T>... itemMatchers)Creates an order agnostic matcher for Iterables that matches when a single pass over
 the examinedIterableyields a series of items, each satisfying one matcher anywhere
 in the specified matchers. | |
| static
 | IsIterableContainingInAnyOrder.containsInAnyOrder(T... items)Creates an order agnostic matcher for Iterables that matches when a single pass over
 the examinedIterableyields a series of items, each logically equal to one item
 anywhere in the specified items. | |
| static
 | IsEmptyCollection.empty()Creates a matcher for Collections matching examined collections whoseisEmptymethod returnstrue. | |
| static
 | IsArrayWithSize.emptyArray()Creates a matcher for arrays that matches when the lengthof the array
 is zero. | |
| static
 | IsEmptyCollection.emptyCollectionOf(java.lang.Class<E> type)Creates a matcher for Collections matching examined collections whoseisEmptymethod returnstrue. | |
| static
 | IsEmptyIterable.emptyIterable()Creates a matcher for Iterables matching examined iterables that yield no items. | |
| static
 | IsEmptyIterable.emptyIterableOf(java.lang.Class<E> type)Creates a matcher for Iterables matching examined iterables that yield no items. | |
| static
 | IsMapContaining.hasEntry(K key,
         V value)Creates a matcher for Maps matching when the examinedMapcontains
 at least one entry whose key equals the specifiedkeyand whose value equals the
 specifiedvalue. | |
| static
 | IsMapContaining.hasEntry(Matcher<? super K> keyMatcher,
         Matcher<? super V> valueMatcher)Creates a matcher for Maps matching when the examinedMapcontains
 at least one entry whose key satisfies the specifiedkeyMatcherand whose
 value satisfies the specifiedvalueMatcher. | |
| static
 | IsArrayContaining.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
 | IsArrayContaining.hasItemInArray(T element)A shortcut to the frequently used hasItemInArray(equalTo(x)). | |
| static
 | IsMapContaining.hasKey(K key)Creates a matcher for Maps matching when the examinedMapcontains
 at least one key that is equal to the specified key. | |
| static
 | IsMapContaining.hasKey(Matcher<? super K> keyMatcher)Creates a matcher for Maps matching when the examinedMapcontains
 at least one key that satisfies the specified matcher. | |
| static
 | IsCollectionWithSize.hasSize(int size)Creates a matcher for Collections that matches when thesize()method returns
 a value equal to the specifiedsize. | |
| static
 | IsCollectionWithSize.hasSize(Matcher<? super java.lang.Integer> sizeMatcher)Creates a matcher for Collections that matches when thesize()method returns
 a value that satisfies the specified matcher. | |
| static
 | IsMapContaining.hasValue(Matcher<? super V> valueMatcher)Creates a matcher for Maps matching when the examinedMapcontains
 at least one value that satisfies the specified valueMatcher. | |
| static
 | IsMapContaining.hasValue(V value)Creates a matcher for Maps matching when the examinedMapcontains
 at least one value that is equal to the specified value. | |
| static
 | IsIn.isIn(java.util.Collection<T> collection)Creates a matcher that matches when the examined object is found within the specified collection. | |
| static
 | IsIn.isIn(T[] elements)Creates a matcher that matches when the examined object is found within the specified array. | |
| static
 | IsIn.isOneOf(T... elements)Creates a matcher that matches when the examined object is equal to one of the specified elements. | |
| static
 | IsIterableWithSize.iterableWithSize(int size)Creates a matcher for Iterables that matches when a single pass over the
 examinedIterableyields an item count that is equal to the specifiedsizeargument. | |
| static
 | IsIterableWithSize.iterableWithSize(Matcher<? super java.lang.Integer> sizeMatcher)Creates a matcher for Iterables that matches when a single pass over the
 examinedIterableyields an item count that satisfies the specified
 matcher. | |
| Uses of Factory in org.hamcrest.core | 
|---|
| Methods in org.hamcrest.core with annotations of type Factory | ||
|---|---|---|
| static
 | AllOf.allOf(java.lang.Iterable<Matcher<? super T>> matchers)Creates a matcher that matches if the examined object matches ALL of the specified matchers. | |
| static
 | AllOf.allOf(Matcher<? super T>... matchers)Creates a matcher that matches if the examined object matches ALL of the specified matchers. | |
| static
 | AllOf.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
 | AllOf.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
 | AllOf.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
 | AllOf.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
 | AllOf.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
 | IsInstanceOf.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 theClass.isInstance(Object)method on that type, passing the
 the examined object. | |
| static
 | AnyOf.anyOf(java.lang.Iterable<Matcher<? super T>> matchers)Creates a matcher that matches if the examined object matches ANY of the specified matchers. | |
| static
 | AnyOf.anyOf(Matcher<? super T>... matchers)Creates a matcher that matches if the examined object matches ANY of the specified matchers. | |
| static
 | AnyOf.anyOf(Matcher<T> first,
      Matcher<? super T> second)Creates a matcher that matches if the examined object matches ANY of the specified matchers. | |
| static
 | AnyOf.anyOf(Matcher<T> first,
      Matcher<? super T> second,
      Matcher<? super T> third)Creates a matcher that matches if the examined object matches ANY of the specified matchers. | |
| static
 | AnyOf.anyOf(Matcher<T> first,
      Matcher<? super T> second,
      Matcher<? super T> third,
      Matcher<? super T> fourth)Creates a matcher that matches if the examined object matches ANY of the specified matchers. | |
| static
 | AnyOf.anyOf(Matcher<T> first,
      Matcher<? super T> second,
      Matcher<? super T> third,
      Matcher<? super T> fourth,
      Matcher<? super T> fifth)Creates a matcher that matches if the examined object matches ANY of the specified matchers. | |
| static
 | AnyOf.anyOf(Matcher<T> first,
      Matcher<? super T> second,
      Matcher<? super T> third,
      Matcher<? super T> fourth,
      Matcher<? super T> fifth,
      Matcher<? super T> sixth)Creates a matcher that matches if the examined object matches ANY of the specified matchers. | |
| static Matcher<java.lang.Object> | IsAnything.anything()Creates a matcher that always matches, regardless of the examined object. | |
| static Matcher<java.lang.Object> | IsAnything.anything(java.lang.String description)Creates a matcher that always matches, regardless of the examined object, but describes itself with the specified String. | |
| static
 | CombinableMatcher.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> | StringContains.containsString(java.lang.String substring)Creates a matcher that matches if the examined Stringcontains the specifiedStringanywhere. | |
| static
 | DescribedAs.describedAs(java.lang.String description,
            Matcher<T> matcher,
            java.lang.Object... values)Wraps an existing matcher, overriding its description with that specified. | |
| static
 | CombinableMatcher.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> | StringEndsWith.endsWith(java.lang.String suffix)Creates a matcher that matches if the examined Stringends with the specifiedString. | |
| static
 | IsEqual.equalTo(T operand)Creates a matcher that matches when the examined object is logically equal to the specified operand, as determined by calling theObject.equals(java.lang.Object)method on
 the examined object. | |
| static
 | Every.everyItem(Matcher<U> itemMatcher)Creates a matcher for Iterables that only matches when a single pass over the
 examinedIterableyields items that are all matched by the specifieditemMatcher. | |
| static
 | IsCollectionContaining.hasItem(Matcher<? super T> itemMatcher)Creates a matcher for Iterables that only matches when a single pass over the
 examinedIterableyields at least one item that is matched by the specifieditemMatcher. | |
| static
 | IsCollectionContaining.hasItem(T item)Creates a matcher for Iterables that only matches when a single pass over the
 examinedIterableyields at least one item that is equal to the specifieditem. | |
| static
 | IsCollectionContaining.hasItems(Matcher<? super T>... itemMatchers)Creates a matcher for Iterables that matches when consecutive passes over the
 examinedIterableyield at least one item that is matched by the corresponding
 matcher from the specifieditemMatchers. | |
| static
 | IsCollectionContaining.hasItems(T... items)Creates a matcher for Iterables that matches when consecutive passes over the
 examinedIterableyield at least one item that is equal to the corresponding
 item from the specifieditems. | |
| static
 | IsInstanceOf.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 theClass.isInstance(Object)method on that type, passing the
 the examined object. | |
| static
 | Is.is(java.lang.Class<T> type)Deprecated. use isA(Class | |
| static
 | Is.is(Matcher<T> matcher)Decorates another Matcher, retaining its behaviour, but allowing tests to be slightly more expressive. | |
| static
 | Is.is(T value)A shortcut to the frequently used is(equalTo(x)). | |
| static
 | Is.isA(java.lang.Class<T> type)A shortcut to the frequently used is(instanceOf(SomeClass.class)). | |
| static
 | IsNot.not(Matcher<T> matcher)Creates a matcher that wraps an existing matcher, but inverts the logic by which it will match. | |
| static
 | IsNot.not(T value)A shortcut to the frequently used not(equalTo(x)). | |
| static Matcher<java.lang.Object> | IsNull.notNullValue()A shortcut to the frequently used not(nullValue()). | |
| static
 | IsNull.notNullValue(java.lang.Class<T> type)A shortcut to the frequently used not(nullValue(X.class)). | |
| static Matcher<java.lang.Object> | IsNull.nullValue()Creates a matcher that matches if examined object is null. | |
| static
 | IsNull.nullValue(java.lang.Class<T> type)Creates a matcher that matches if examined object is null. | |
| static
 | IsSame.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> | StringStartsWith.startsWith(java.lang.String prefix)Creates a matcher that matches if the examined Stringstarts with the specifiedString. | |
| static
 | IsSame.theInstance(T target)Creates a matcher that matches only when the examined object is the same instance as the specified target object. | |
| Uses of Factory in org.hamcrest.number | 
|---|
| Methods in org.hamcrest.number with annotations of type Factory | ||
|---|---|---|
| static Matcher<java.math.BigDecimal> | BigDecimalCloseTo.closeTo(java.math.BigDecimal operand,
        java.math.BigDecimal error)Creates a matcher of BigDecimals that matches when an examined BigDecimal is equal
 to the specifiedoperand, within a range of +/-error. | |
| static Matcher<java.lang.Double> | IsCloseTo.closeTo(double operand,
        double error)Creates a matcher of Doubles that matches when an examined double is equal
 to the specifiedoperand, within a range of +/-error. | |
| static
 | OrderingComparison.comparesEqualTo(T value)Creates a matcher of Comparableobject that matches when the examined object is
 equal to the specified value, as reported by thecompareTomethod of the
 examined object. | |
| static
 | OrderingComparison.greaterThan(T value)Creates a matcher of Comparableobject that matches when the examined object is
 greater than the specified value, as reported by thecompareTomethod of the
 examined object. | |
| static
 | OrderingComparison.greaterThanOrEqualTo(T value)Creates a matcher of Comparableobject that matches when the examined object is
 greater than or equal to the specified value, as reported by thecompareTomethod
 of the examined object. | |
| static
 | OrderingComparison.lessThan(T value)Creates a matcher of Comparableobject that matches when the examined object is
 less than the specified value, as reported by thecompareTomethod of the
 examined object. | |
| static
 | OrderingComparison.lessThanOrEqualTo(T value)Creates a matcher of Comparableobject that matches when the examined object is
 less than or equal to the specified value, as reported by thecompareTomethod
 of the examined object. | |
| Uses of Factory in org.hamcrest.object | 
|---|
| Methods in org.hamcrest.object with annotations of type Factory | ||
|---|---|---|
| static Matcher<java.util.EventObject> | IsEventFrom.eventFrom(java.lang.Class<? extends java.util.EventObject> eventClass,
          java.lang.Object source)Creates a matcher of EventObjectthat matches any object
 derived from eventClass announced by source. | |
| static Matcher<java.util.EventObject> | IsEventFrom.eventFrom(java.lang.Object source)Creates a matcher of EventObjectthat matches any EventObject
 announced by source. | |
| static
 | HasToString.hasToString(Matcher<? super java.lang.String> toStringMatcher)Creates a matcher that matches any examined object whose toStringmethod
 returns a value that satisfies the specified matcher. | |
| static
 | HasToString.hasToString(java.lang.String expectedToString)Creates a matcher that matches any examined object whose toStringmethod
 returns a value equalTo the specified string. | |
| static
 | IsCompatibleType.typeCompatibleWith(java.lang.Class<T> baseType)Creates a matcher of Classthat matches when the specified baseType is
 assignable from the examined class. | |
| Uses of Factory in org.hamcrest.text | 
|---|
| Methods in org.hamcrest.text with annotations of type Factory | |
|---|---|
| static Matcher<java.lang.String> | IsEqualIgnoringCase.equalToIgnoringCase(java.lang.String expectedString)Creates a matcher of Stringthat matches when the examined string is equal to
 the specified expectedString, ignoring case. | 
| static Matcher<java.lang.String> | IsEqualIgnoringWhiteSpace.equalToIgnoringWhiteSpace(java.lang.String expectedString)Creates a matcher of Stringthat matches when the examined string is equal to
 the specified expectedString, when whitespace differences are (mostly) ignored. | 
| static Matcher<java.lang.String> | IsEmptyString.isEmptyOrNullString()Creates a matcher of Stringthat matches when the examined string isnull, or
 has zero length. | 
| static Matcher<java.lang.String> | IsEmptyString.isEmptyString()Creates a matcher of Stringthat matches when the examined string has zero length. | 
| static Matcher<java.lang.String> | StringContainsInOrder.stringContainsInOrder(java.lang.Iterable<java.lang.String> substrings)Creates a matcher of Stringthat matches when the examined string contains all of
 the specified substrings, regardless of the order of their appearance. | 
| Uses of Factory in org.hamcrest.xml | 
|---|
| Methods in org.hamcrest.xml with annotations of type Factory | |
|---|---|
| static Matcher<org.w3c.dom.Node> | HasXPath.hasXPath(java.lang.String xPath)Creates a matcher of Nodes that matches when the examined node contains a node
 at the specifiedxPath, with any content. | 
| static Matcher<org.w3c.dom.Node> | HasXPath.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
 specifiedxPaththat satisfies the specifiedvalueMatcher. | 
| static Matcher<org.w3c.dom.Node> | HasXPath.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 specifiedxPathwithin the specified namespace context, with any content. | 
| static Matcher<org.w3c.dom.Node> | HasXPath.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
 specifiedxPath, within the specifiednamespaceContext, that satisfies
 the specifiedvalueMatcher. | 
| 
 | ||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||