Example usage for javafx.beans.property BooleanProperty get

List of usage examples for javafx.beans.property BooleanProperty get

Introduction

In this page you can find the example usage for javafx.beans.property BooleanProperty get.

Prototype

boolean get();

Source Link

Document

Returns the current value of this ObservableBooleanValue .

Usage

From source file:com.adobe.ags.curly.controller.ActionRunner.java

private String getURL() throws URISyntaxException {
    StringBuilder urlBuilder = new StringBuilder();
    String URI = URL.contains("?") ? URL.substring(0, URL.indexOf('?')) : URL;
    URI = URI.replaceAll("\\s", "%20");
    urlBuilder.append(URI);//from w ww . java2  s.  c om
    final BooleanProperty hasQueryString = new SimpleBooleanProperty(URL.contains("?"));
    getVariables.forEach((key, values) -> {
        if (values != null) {
            values.forEach(value -> {
                try {
                    urlBuilder.append(hasQueryString.get() ? "&" : "?").append(URLEncoder.encode(key, UTF8))
                            .append("=").append(URLEncoder.encode(value != null ? value : "", UTF8));
                    hasQueryString.set(false);
                } catch (UnsupportedEncodingException ex) {
                    Logger.getLogger(ActionRunner.class.getName()).log(Level.SEVERE, null, ex);
                }
            });
        }
    });
    return urlBuilder.toString();
}