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"), "");
}
}