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

org.openqa.selenium.devtools.v90.page.model.FontSizes Maven / Gradle / Ivy

Go to download

Selenium automates browsers. That's it! What you do with that power is entirely up to you.

There is a newer version: 4.0.0-beta-4
Show newest version
package org.openqa.selenium.devtools.v90.page.model;

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

/**
 * Default font sizes.
 */
@org.openqa.selenium.Beta()
public class FontSizes {

    private final java.util.Optional standard;

    private final java.util.Optional fixed;

    public FontSizes(java.util.Optional standard, java.util.Optional fixed) {
        this.standard = standard;
        this.fixed = fixed;
    }

    /**
     * Default standard font size.
     */
    public java.util.Optional getStandard() {
        return standard;
    }

    /**
     * Default fixed font size.
     */
    public java.util.Optional getFixed() {
        return fixed;
    }

    private static FontSizes fromJson(JsonInput input) {
        java.util.Optional standard = java.util.Optional.empty();
        java.util.Optional fixed = java.util.Optional.empty();
        input.beginObject();
        while (input.hasNext()) {
            switch(input.nextName()) {
                case "standard":
                    standard = java.util.Optional.ofNullable(input.nextNumber().intValue());
                    break;
                case "fixed":
                    fixed = java.util.Optional.ofNullable(input.nextNumber().intValue());
                    break;
                default:
                    input.skipValue();
                    break;
            }
        }
        input.endObject();
        return new FontSizes(standard, fixed);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy