K - The type of object held by the selectorT - The type of object held by the selectorpublic class ObjectSelector<K,T> extends Object implements Selector<K>, Predicate<K>
Selector implementation that uses the Object.hashCode() and Object.equals(Object)
methods of the internal object to determine a match.| Constructor and Description |
|---|
ObjectSelector(T object)
Create a new
Selector instance from the given object. |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
clone() |
HeaderResolver |
getHeaderResolver()
Return a component that can resolve headers from a key
|
T |
getObject()
Get the object being used for comparisons and equals checks.
|
boolean |
matches(K key)
Indicates whether this Selector matches the
key. |
static <T> Selector<T> |
objectSelector(T obj)
Helper method to create a
Selector from the given object. |
boolean |
test(K t)
Returns true if the input object matches some criteria.
|
String |
toString() |
public static <T> Selector<T> objectSelector(T obj)
Selector from the given object.T - The type of the object.obj - The object to wrap.Selector.public T getObject()
Selectorpublic boolean matches(K key)
Selectorkey.public HeaderResolver getHeaderResolver()
SelectorgetHeaderResolver in interface Selector<K>HeaderResolver applicable to this Selector type.public boolean test(K t)
Predicateprotected Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionCopyright © 2016. All rights reserved.