Interface BasicNotifierImpl.EScannableAdapterList
- All Known Implementing Classes:
BasicNotifierImpl.EAdapterList
- Enclosing class:
- BasicNotifierImpl
public static interface BasicNotifierImpl.EScannableAdapterList
An interface implemented by an adapter list that supports direct adapter lookup based on type,
i.e., that directly and very efficiently implements the equivalent of the follow logic.
public static Adapter getAdapter(List<Adapter> adapters, Object type)
{
for (int i = 0, size = adapters.size(); i < size; ++i)
{
Adapter adapter = adapters.get(i);
if (adapter.isAdapterForType(type))
{
return adapter;
}
}
return null;
}
- Since:
- 2.15
-
Method Summary
Modifier and TypeMethodDescriptiongetAdapterForType(Object type) Returns that first adapter in the list for whichisAdapterForType(type)returntrue.
-
Method Details
-
getAdapterForType
Returns that first adapter in the list for whichisAdapterForType(type)returntrue.- Parameters:
type- the type of adapter to get.- Returns:
- the first adapter in the list for which
isAdapterForType(Object)returntrue, ornullif there isn't one.
-