package com.codeborne.selenide;

import com.codeborne.selenide.collections.ExactTexts;
import com.codeborne.selenide.collections.ListSize;
import com.codeborne.selenide.collections.Texts;
import com.codeborne.selenide.impl.WebElementsCollection;
import com.google.common.base.Predicate;
import org.openqa.selenium.WebElement;

import java.util.List;

public abstract class CollectionCondition implements Predicate<List<WebElement>> {
  public abstract void fail(WebElementsCollection collection, List<WebElement> elements, Exception lastError, long timeoutMs);

  public static final CollectionCondition empty = size(0);

  /**
   * Checks that collection has the given size
   */
  public static CollectionCondition size(final int expectedSize) {
    return new ListSize(expectedSize);
  }

  /**
   * Checks that given collection has given texts (each collection element CONTAINS corresponding text)
   *
   * <p>NB! Ignores multiple whitespaces between words</p>
   */
  public static CollectionCondition texts(final String... expectedTexts) {
    return new Texts(expectedTexts);
  }

  /**
   * Checks that given collection has given texts (each collection element EQUALS TO corresponding text)
   *
   * <p>NB! Ignores multiple whitespaces between words</p>
   */
  public static CollectionCondition exactTexts(final String... expectedTexts) {
    return new ExactTexts(expectedTexts);
  }
}

@@ -571,22 +571,16 @@
  static 
-final 
 Collecti
@@ -608,16 +608,16 @@
 ize(0);%0A
+
 %0A  /**%0A 
@@ -709,22 +709,16 @@
 on size(
-final 
 int expe
@@ -991,30 +991,24 @@
 ition texts(
-final 
 String... ex
@@ -1237,32 +1237,32 @@
 words%3C/p%3E%0A   */%0A
+
   public static 
@@ -1296,14 +1296,8 @@
 xts(
-final 
 Stri

remove useless "final"