Class ComponentList<T>

Type Parameters:
T - type of component
All Implemented Interfaces:
Iterable<T>, Collection<T>, List<T>, LazyComponents, WrapsElements
Direct Known Subclasses:
FluentListImpl

public class ComponentList<T> extends DelegatingList<T> implements WrapsElements, LazyComponents
List of Component.
See Also:
  • Field Details

    • componentClass

      protected final Class<T> componentClass
    • instantiator

      protected final ComponentInstantiator instantiator
    • control

      protected final FluentControl control
    • proxy

      protected List<org.openqa.selenium.WebElement> proxy
  • Constructor Details

    • ComponentList

      public ComponentList (Class<T> componentClass, List<T> list, FluentControl control, ComponentInstantiator instantiator)
      Creates a new list of components
      Parameters:
      componentClass - component class
      list - underlying list of components
      control - control interface
      instantiator - component instantiator
  • Method Details

    • getWrappedElements

      public List<org.openqa.selenium.WebElement> getWrappedElements()
      Description copied from interface: WrapsElements
      Get the wrapped elements
      Specified by:
      getWrappedElements in interface WrapsElements
      Returns:
      wrapped elements
    • isLazy

      public boolean isLazy()
      Description copied from interface: LazyComponents
      Get the lazyness of this object.
      Specified by:
      isLazy in interface LazyComponents<T>
      Returns:
      true if it's lazy, false otherwise.
    • addLazyComponentsListener

      public boolean addLazyComponentsListener (LazyComponentsListener listener)
      Description copied from interface: LazyComponents
      Add a lazy components initialization listener.
      Specified by:
      addLazyComponentsListener in interface LazyComponents<T>
      Parameters:
      listener - lazy components listener
      Returns:
      true if the listener was added, false otherwise
    • isLazyInitialized

      public boolean isLazyInitialized()
      Description copied from interface: LazyComponents
      Check if the underlying lazy components are initialized.
      Specified by:
      isLazyInitialized in interface LazyComponents<T>
      Returns:
      true if lazy components are initialized, false otherwise.
    • removeLazyComponentsListener

      public boolean removeLazyComponentsListener (LazyComponentsListener listener)
      Description copied from interface: LazyComponents
      Remove an existing lazy components initialization listener.
      Specified by:
      removeLazyComponentsListener in interface LazyComponents<T>
      Parameters:
      listener - lazy components listener
      Returns:
      true if the listener was added, false otherwise