Package org.fluentlenium.core.domain
Class ComponentList<T>
- java.lang.Object
-
- org.fluentlenium.core.domain.ListImpl<T>
-
- org.fluentlenium.core.domain.DelegatingList<T>
-
- org.fluentlenium.core.domain.ComponentList<T>
-
- Type Parameters:
T
- type of component
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Collection<T>
,java.util.List<T>
,LazyComponents
,WrapsElements
- Direct Known Subclasses:
FluentListImpl
public class ComponentList<T> extends DelegatingList<T> implements WrapsElements, LazyComponents
List of Component.- See Also:
Component
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<T>
componentClass
protected FluentControl
control
protected ComponentInstantiator
instantiator
protected java.util.List<org.openqa.selenium.WebElement>
proxy
-
Fields inherited from class org.fluentlenium.core.domain.DelegatingList
list
-
-
Constructor Summary
Constructors Constructor Description ComponentList(java.lang.Class<T> componentClass, java.util.List<T> list, FluentControl control, ComponentInstantiator instantiator)
Creates a new list of components
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addLazyComponentsListener(LazyComponentsListener listener)
Add a lazy components initialization listener.java.util.List<org.openqa.selenium.WebElement>
getWrappedElements()
Get the wrapped elementsboolean
isLazy()
Get the lazyness of this object.boolean
isLazyInitialized()
Check if the underlying lazy components are initialized.boolean
removeLazyComponentsListener(LazyComponentsListener listener)
Remove an existing lazy components initialization listener.-
Methods inherited from class org.fluentlenium.core.domain.DelegatingList
getList
-
Methods inherited from class org.fluentlenium.core.domain.ListImpl
add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Field Detail
-
componentClass
protected final java.lang.Class<T> componentClass
-
instantiator
protected final ComponentInstantiator instantiator
-
control
protected final FluentControl control
-
proxy
protected java.util.List<org.openqa.selenium.WebElement> proxy
-
-
Constructor Detail
-
ComponentList
public ComponentList(java.lang.Class<T> componentClass, java.util.List<T> list, FluentControl control, ComponentInstantiator instantiator)
Creates a new list of components- Parameters:
componentClass
- component classlist
- underlying list of componentscontrol
- control interfaceinstantiator
- component instantiator
-
-
Method Detail
-
getWrappedElements
public java.util.List<org.openqa.selenium.WebElement> getWrappedElements()
Description copied from interface:WrapsElements
Get the wrapped elements- Specified by:
getWrappedElements
in interfaceWrapsElements
- Returns:
- wrapped elements
-
isLazy
public boolean isLazy()
Description copied from interface:LazyComponents
Get the lazyness of this object.- Specified by:
isLazy
in interfaceLazyComponents<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 interfaceLazyComponents<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 interfaceLazyComponents<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 interfaceLazyComponents<T>
- Parameters:
listener
- lazy components listener- Returns:
- true if the listener was added, false otherwise
-
-