class BooleanTextBox extends AbstractRestrictedEntryTextBox {

    @Override
    public boolean isValidValue(final String value,
                                final boolean isOnFocusLost) {

        return (!isOnFocusLost && "-".equals(value))
                || (value.trim().isEmpty() && allowEmptyValue)
                || Objects.equals(value.toLowerCase(), Boolean.TRUE.toString())
                || Objects.equals(value.toLowerCase(), Boolean.FALSE.toString());
    }

    public  BooleanTextBox(final boolean allowEmptyValue);

}