Top Description Constructors Methods
org.terracotta.context.extended

public final Class ExtendedMatchers

extends Object
Class Inheritance
Imports
org.terracotta.context.query.Matcher, java.util.Arrays, .Collection, .Map, .Set

Matchers specific to standard extended properties

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Matcher<Map<String, Object>>

Returns:

a Map<String, Object> matcher for the key
hasProperty
(final String
key searched
key
)

Returns a matcher that checks if the "properties" attribute contains an entry for key.

public static Matcher<Map<String, Object>>

Returns:

a Map<String, Object> matcher for the key and value
hasProperty
(final String
key searched
key
,
final String
value searched
value
)

Returns a matcher that checks if the "properties" attribute contains an entry for key and a value equals to value.

public static Matcher<Map<String, Object>>

Returns:

a Map<String, Object> matcher for the tag
hasTag
(final String
tag searched
tag
)

Returns a matcher that checks if the "tags" attribute contains the tag.

public static Matcher<Map<String, Object>>

Returns:

a Map<String, Object> matcher for the tags
hasTags
(final String...
tags searched
tags
)

Returns a matcher that checks if the "tags" attribute contains all the tags.

public static Matcher<Map<String, Object>>

Returns:

a Map<String, Object> matcher for the tags
hasTags
(final Collection<String>
tags searched
tags
)

Returns a matcher that checks if the "tags" attribute contains all the tags.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ExtendedMatchersback to summary
private ExtendedMatchers()

Method Detail

hasPropertyback to summary
public static Matcher<Map<String, Object>> hasProperty(final String key)

Returns a matcher that checks if the "properties" attribute contains an entry for key.

Parameters
key:String

key searched

Returns:Matcher<Map<String, Object>>

a Map<String, Object> matcher for the key

hasPropertyback to summary
public static Matcher<Map<String, Object>> hasProperty(final String key, final String value)

Returns a matcher that checks if the "properties" attribute contains an entry for key and a value equals to value.

Parameters
key:String

key searched

value:String

value searched

Returns:Matcher<Map<String, Object>>

a Map<String, Object> matcher for the key and value

hasTagback to summary
public static Matcher<Map<String, Object>> hasTag(final String tag)

Returns a matcher that checks if the "tags" attribute contains the tag.

Parameters
tag:String

tag searched

Returns:Matcher<Map<String, Object>>

a Map<String, Object> matcher for the tag

hasTagsback to summary
public static Matcher<Map<String, Object>> hasTags(final String... tags)

Returns a matcher that checks if the "tags" attribute contains all the tags.

Parameters
tags:String[]

tags searched

Returns:Matcher<Map<String, Object>>

a Map<String, Object> matcher for the tags

hasTagsback to summary
public static Matcher<Map<String, Object>> hasTags(final Collection<String> tags)

Returns a matcher that checks if the "tags" attribute contains all the tags.

Parameters
tags:Collection<String>

tags searched

Returns:Matcher<Map<String, Object>>

a Map<String, Object> matcher for the tags