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 invalid input: '<' size; ++i)
   {
     Adapter adapter = adapters.get(i);
     if (adapter.isAdapterForType(type))
     {
       return adapter;
     }
    }
    return null;
  }
 
Since:
2.15
  • Method Details

    • getAdapterForType

      Adapter getAdapterForType(Object type)
      Returns that first adapter in the list for which isAdapterForType(type) return true.
      Parameters:
      type - the type of adapter to get.
      Returns:
      the first adapter in the list for which isAdapterForType(Object) return true, or null if there isn't one.