# BundleMatchers

Summary:[Methods](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers#)  

# BundleMatchers

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
BundleMatchers
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|-------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.test.espresso.intent.matcher.BundleMatchers |

<br />

*** ** * ** ***

A collection of hamcrest matchers to match[Bundle](https://developer.android.com/reference/android/os/Bundle.html)objects.

## Summary

|                                                                                                                                                                                                     ### Public methods                                                                                                                                                                                                     ||
|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>`     | ` `[hasEntry](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers#hasEntry(java.lang.String, org.hamcrest.Matcher<?>))`(`[String](https://developer.android.com/reference/java/lang/String.html)` key, Matcher<?> valueMatcher) `                                       |
| ` static <T> Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>` | ` `[hasEntry](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers#hasEntry(java.lang.String, T))`(`[String](https://developer.android.com/reference/java/lang/String.html)` key, T value) `                                                                             |
| ` static Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>`     | ` `[hasEntry](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers#hasEntry(org.hamcrest.Matcher<java.lang.String>, org.hamcrest.Matcher<?>))`(Matcher<`[String](https://developer.android.com/reference/java/lang/String.html)`> keyMatcher, Matcher<?> valueMatcher) ` |
| ` static Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>`     | ` `[hasKey](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers#hasKey(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` key) `                                                                                             |
| ` static Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>`     | ` `[hasKey](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers#hasKey(org.hamcrest.Matcher<java.lang.String>))`(Matcher<`[String](https://developer.android.com/reference/java/lang/String.html)`> keyMatcher) `                                                       |
| ` static <T> Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>` | ` `[hasValue](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers#hasValue(T))`(T value) `                                                                                                                                                                              |
| ` static Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>`     | ` `[hasValue](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers#hasValue(org.hamcrest.Matcher<?>))`(Matcher<?> valueMatcher) `                                                                                                                                        |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||

## Public methods

### hasEntry

```
Matcher<Bundle> hasEntry (String key, 
                Matcher<?> valueMatcher)
```

<br />

<br />

|            Parameters            ||
|----------------|------------------|
| `key`          | `String` <br />  |
| `valueMatcher` | `Matcher` <br /> |

|                                            Returns                                            ||
|---------------------------------------------------------------------------------------|--------|
| `Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>` | <br /> |

### hasEntry

```
Matcher<Bundle> hasEntry (String key, 
                T value)
```

<br />

<br />

|        Parameters        ||
|---------|-----------------|
| `key`   | `String` <br /> |
| `value` | `T` <br />      |

|                                            Returns                                            ||
|---------------------------------------------------------------------------------------|--------|
| `Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>` | <br /> |

### hasEntry

```
Matcher<Bundle> hasEntry (Matcher<String> keyMatcher, 
                Matcher<?> valueMatcher)
```

<br />

<br />

|            Parameters            ||
|----------------|------------------|
| `keyMatcher`   | `Matcher` <br /> |
| `valueMatcher` | `Matcher` <br /> |

|                                            Returns                                            ||
|---------------------------------------------------------------------------------------|--------|
| `Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>` | <br /> |

### hasKey

```
Matcher<Bundle> hasKey (String key)
```

<br />

<br />

|       Parameters       ||
|-------|-----------------|
| `key` | `String` <br /> |

|                                            Returns                                            ||
|---------------------------------------------------------------------------------------|--------|
| `Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>` | <br /> |

### hasKey

```
Matcher<Bundle> hasKey (Matcher<String> keyMatcher)
```

<br />

<br />

|           Parameters           ||
|--------------|------------------|
| `keyMatcher` | `Matcher` <br /> |

|                                            Returns                                            ||
|---------------------------------------------------------------------------------------|--------|
| `Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>` | <br /> |

### hasValue

```
Matcher<Bundle> hasValue (T value)
```

<br />

<br />

|     Parameters      ||
|---------|------------|
| `value` | `T` <br /> |

|                                            Returns                                            ||
|---------------------------------------------------------------------------------------|--------|
| `Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>` | <br /> |

### hasValue

```
Matcher<Bundle> hasValue (Matcher<?> valueMatcher)
```

<br />

<br />

|            Parameters            ||
|----------------|------------------|
| `valueMatcher` | `Matcher` <br /> |

|                                            Returns                                            ||
|---------------------------------------------------------------------------------------|--------|
| `Matcher<`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`>` | <br /> |

-

  ## Classes

  - [BundleMatchers](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers)
  - [ComponentNameMatchers](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/ComponentNameMatchers)
  - [IntentMatchers](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/IntentMatchers)
  - [UriMatchers](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers)