// Path: src/main/java/io/qameta/htmlelements/matcher/PredicateMatcher.java
// public class PredicateMatcher<T> extends TypeSafeMatcher<T> {
// 
//     private final Predicate<T> predicate;
// 
//     public PredicateMatcher(Predicate<T> predicate) {
//         this.predicate = predicate;
//     }
// 
//     @Override
//     protected boolean matchesSafely(T t) {
//         return predicate.test(t);
//     }
// 
//     @Override
//     public void describeTo(Description description) {
// 
//     }
// 
// }


import io.qameta.htmlelements.extension.ConvertMethod;
import io.qameta.htmlelements.extension.DescriptionProvider;
import io.qameta.htmlelements.extension.FilterMethod;
import io.qameta.htmlelements.extension.SelectorProvider;
import io.qameta.htmlelements.extension.ShouldMethod;
import io.qameta.htmlelements.extension.Timeout;
import io.qameta.htmlelements.extension.ToStringMethod;
import io.qameta.htmlelements.extension.WaitUntilMethod;
import io.qameta.htmlelements.matcher.PredicateMatcher;
import org.hamcrest.Matcher;
import java.util.List;
import java.util.function.Function;
import java.util.function.Predicate;
package io.qameta.htmlelements.element;



public interface ExtendedList<ItemType> extends List<ItemType> {

    @SelectorProvider
    String getSelector();

    @DescriptionProvider
    String getDescription();

    @ConvertMethod
    <R> ExtendedList<R> convert(Function<ItemType, R> function);

    @FilterMethod
    ExtendedList<ItemType> filter(Predicate<ItemType> predicate);

    default ExtendedList<ItemType> filter(Matcher matcher) {
        return filter(matcher::matches);
    }

    default ExtendedList<ItemType> filter(String description, Predicate<ItemType> predicate) {
        return filter(predicate);
    }

    @WaitUntilMethod
    ExtendedList<ItemType> waitUntil(String message, Matcher matcher);

    @WaitUntilMethod
    ExtendedList<ItemType> waitUntil(String message, Matcher matcher, @Timeout long timeout);

    default ExtendedList<ItemType> waitUntil(Matcher matcher) {
        return waitUntil("", matcher);
    }

    default ExtendedList<ItemType> waitUntil(String message, Predicate<ExtendedList<ItemType>> predicate) {
// Path: src/main/java/io/qameta/htmlelements/matcher/PredicateMatcher.java
// public class PredicateMatcher<T> extends TypeSafeMatcher<T> {
// 
//     private final Predicate<T> predicate;
// 
//     public PredicateMatcher(Predicate<T> predicate) {
//         this.predicate = predicate;
//     }
// 
//     @Override
//     protected boolean matchesSafely(T t) {
//         return predicate.test(t);
//     }
// 
//     @Override
//     public void describeTo(Description description) {
// 
//     }
// 
// }


// Path: src/main/java/io/qameta/htmlelements/element/ExtendedList.java
import io.qameta.htmlelements.extension.ConvertMethod;
import io.qameta.htmlelements.extension.DescriptionProvider;
import io.qameta.htmlelements.extension.FilterMethod;
import io.qameta.htmlelements.extension.SelectorProvider;
import io.qameta.htmlelements.extension.ShouldMethod;
import io.qameta.htmlelements.extension.Timeout;
import io.qameta.htmlelements.extension.ToStringMethod;
import io.qameta.htmlelements.extension.WaitUntilMethod;
import io.qameta.htmlelements.matcher.PredicateMatcher;
import org.hamcrest.Matcher;
import java.util.List;
import java.util.function.Function;
import java.util.function.Predicate;

package io.qameta.htmlelements.element;



public interface ExtendedList<ItemType> extends List<ItemType> {

    @SelectorProvider
    String getSelector();

    @DescriptionProvider
    String getDescription();

    @ConvertMethod
    <R> ExtendedList<R> convert(Function<ItemType, R> function);

    @FilterMethod
    ExtendedList<ItemType> filter(Predicate<ItemType> predicate);

    default ExtendedList<ItemType> filter(Matcher matcher) {
        return filter(matcher::matches);
    }

    default ExtendedList<ItemType> filter(String description, Predicate<ItemType> predicate) {
        return filter(predicate);
    }

    @WaitUntilMethod
    ExtendedList<ItemType> waitUntil(String message, Matcher matcher);

    @WaitUntilMethod
    ExtendedList<ItemType> waitUntil(String message, Matcher matcher, @Timeout long timeout);

    default ExtendedList<ItemType> waitUntil(Matcher matcher) {
        return waitUntil("", matcher);
    }

    default ExtendedList<ItemType> waitUntil(String message, Predicate<ExtendedList<ItemType>> predicate) {
        return waitUntil(message, new PredicateMatcher<>(predicate));