Package jadex.bridge.service.search
Class TagFilter<T>
- java.lang.Object
-
- jadex.bridge.service.search.TagFilter<T>
-
- All Implemented Interfaces:
IAsyncFilter<T>
public class TagFilter<T> extends java.lang.Object implements IAsyncFilter<T>
Tag filter class. Allows for filtering according to a collection of tags. Includes only services that contain all the tags. Replaces variables to dynamic values and uses TagProperty.createRuntimeTags() for that.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jadex.commons.IAsyncFilter
IAsyncFilter.AlwaysFilter<E>, IAsyncFilter.NeverFilter<E>
-
-
Field Summary
Fields Modifier and Type Field Description protected IExternalAccess
component
The component.protected java.util.Collection<java.lang.String>
tags
The search tags.-
Fields inherited from interface jadex.commons.IAsyncFilter
ALWAYS, NEVER
-
-
Constructor Summary
Constructors Constructor Description TagFilter()
TagFilter(IExternalAccess component, java.lang.String... tags)
Create a new tag filter.TagFilter(IExternalAccess component, java.util.Collection<java.lang.String> tags)
Create a new tag filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<java.lang.Boolean>
filter(T ts)
Filter if a service contains all the tags.IExternalAccess
getComponent()
java.util.Collection<java.lang.String>
getTags()
void
setComponent(IExternalAccess component)
Sets the component.void
setTags(java.util.Collection<java.lang.String> tags)
Sets the tags.
-
-
-
Field Detail
-
component
protected IExternalAccess component
The component.
-
tags
protected java.util.Collection<java.lang.String> tags
The search tags.
-
-
Constructor Detail
-
TagFilter
public TagFilter()
-
TagFilter
public TagFilter(IExternalAccess component, java.lang.String... tags)
Create a new tag filter.
-
TagFilter
public TagFilter(IExternalAccess component, java.util.Collection<java.lang.String> tags)
Create a new tag filter.
-
-
Method Detail
-
filter
public IFuture<java.lang.Boolean> filter(T ts)
Filter if a service contains all the tags.- Specified by:
filter
in interfaceIAsyncFilter<T>
- Returns:
- True, if passes the filter.
-
getComponent
public IExternalAccess getComponent()
- Returns:
- the component
-
setComponent
public void setComponent(IExternalAccess component)
Sets the component.- Parameters:
component
- The component to set
-
getTags
public java.util.Collection<java.lang.String> getTags()
- Returns:
- the tags
-
setTags
public void setTags(java.util.Collection<java.lang.String> tags)
Sets the tags.- Parameters:
tags
- The tags to set
-
-