All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openqa.selenium.devtools.v88.css.model.PseudoElementMatches Maven / Gradle / Ivy

package org.openqa.selenium.devtools.v88.css.model;

import org.openqa.selenium.Beta;
import org.openqa.selenium.json.JsonInput;

/**
 * CSS rule collection for a single pseudo style.
 */
public class PseudoElementMatches {

    private final org.openqa.selenium.devtools.v88.dom.model.PseudoType pseudoType;

    private final java.util.List matches;

    public PseudoElementMatches(org.openqa.selenium.devtools.v88.dom.model.PseudoType pseudoType, java.util.List matches) {
        this.pseudoType = java.util.Objects.requireNonNull(pseudoType, "pseudoType is required");
        this.matches = java.util.Objects.requireNonNull(matches, "matches is required");
    }

    /**
     * Pseudo element type.
     */
    public org.openqa.selenium.devtools.v88.dom.model.PseudoType getPseudoType() {
        return pseudoType;
    }

    /**
     * Matches of CSS rules applicable to the pseudo style.
     */
    public java.util.List getMatches() {
        return matches;
    }

    private static PseudoElementMatches fromJson(JsonInput input) {
        org.openqa.selenium.devtools.v88.dom.model.PseudoType pseudoType = null;
        java.util.List matches = null;
        input.beginObject();
        while (input.hasNext()) {
            switch(input.nextName()) {
                case "pseudoType":
                    pseudoType = input.read(org.openqa.selenium.devtools.v88.dom.model.PseudoType.class);
                    break;
                case "matches":
                    matches = input.read(new com.google.common.reflect.TypeToken>() {
                    }.getType());
                    break;
                default:
                    input.skipValue();
                    break;
            }
        }
        input.endObject();
        return new PseudoElementMatches(pseudoType, matches);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy