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

com.vaadin.testbench.HasPlaceholder Maven / Gradle / Ivy

/**
 * Copyright (C) 2000-2022 Vaadin Ltd
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See  for the full
 * license.
 */
package com.vaadin.testbench;

import java.util.Objects;

/**
 * Implement by elements which support a placeholder, i.e. text shown when the
 * field is empty.
 */
public interface HasPlaceholder extends HasPropertySettersGetters {

    /**
     * Gets the placeholder for the element.
     *
     * @return the placeholder or an empty string if there is no placeholder
     */
    default String getPlaceholder() {
        return Objects.requireNonNullElse(getPropertyString("placeholder"), "");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy