chore: Deprecate obsolete TouchAction helpers by mykola-mokhnach · Pull Request #2199 · appium/java-client
Expand Up
@@ -16,18 +16,19 @@
package io.appium.java_client.pagefactory.bys;
import lombok.EqualsAndHashCode; import org.openqa.selenium.By; import org.openqa.selenium.SearchContext; import org.openqa.selenium.WebElement;
import javax.annotation.Nonnull; import java.util.List; import java.util.Map; import java.util.Objects;
import static io.appium.java_client.pagefactory.bys.ContentType.NATIVE_MOBILE_SPECIFIC; import static java.util.Objects.requireNonNull;
@EqualsAndHashCode(callSuper = true) public class ContentMappedBy extends By { private final Map<ContentType, By> map; private ContentType currentContent = NATIVE_MOBILE_SPECIFIC; Expand Down Expand Up @@ -62,24 +63,4 @@ public List<WebElement> findElements(SearchContext context) { public String toString() { return map.get(currentContent).toString(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } ContentMappedBy that = (ContentMappedBy) o; return Objects.equals(map, that.map) && currentContent == that.currentContent; }
@Override public int hashCode() { return Objects.hash(super.hashCode(), map, currentContent); } }
package io.appium.java_client.pagefactory.bys;
import lombok.EqualsAndHashCode; import org.openqa.selenium.By; import org.openqa.selenium.SearchContext; import org.openqa.selenium.WebElement;
import javax.annotation.Nonnull; import java.util.List; import java.util.Map; import java.util.Objects;
import static io.appium.java_client.pagefactory.bys.ContentType.NATIVE_MOBILE_SPECIFIC; import static java.util.Objects.requireNonNull;
@EqualsAndHashCode(callSuper = true) public class ContentMappedBy extends By { private final Map<ContentType, By> map; private ContentType currentContent = NATIVE_MOBILE_SPECIFIC; Expand Down Expand Up @@ -62,24 +63,4 @@ public List<WebElement> findElements(SearchContext context) { public String toString() { return map.get(currentContent).toString(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } ContentMappedBy that = (ContentMappedBy) o; return Objects.equals(map, that.map) && currentContent == that.currentContent; }
@Override public int hashCode() { return Objects.hash(super.hashCode(), map, currentContent); } }