T - The type of object held by the selectorpublic class ObjectSelector<T> extends java.lang.Object implements Selector, reactor.fn.Predicate<T>
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 java.lang.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(java.lang.Object key)
Indicates whether this Selector matches the
key. |
static <T> Selector |
objectSelector(T obj)
Helper method to create a
Selector from the given object. |
boolean |
test(T t) |
java.lang.String |
toString() |
public static <T> Selector 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(java.lang.Object key)
Selectorkey.public HeaderResolver getHeaderResolver()
SelectorgetHeaderResolver in interface SelectorHeaderResolver applicable to this Selector type.protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic java.lang.String toString()
toString in class java.lang.Object