Package com.google.common.base

Examples of com.google.common.base.Joiner


    @Override
    public HttpResponse executeDirect(HttpRequest request) {

        HttpUriRequest httpUriRequest = null;

        Joiner joiner = Joiner.on(",").skipNulls();
        URI requestUri = buildUri(request, joiner);

        httpUriRequest = buildHttpUriRequest(request, joiner, requestUri);

        try {
View Full Code Here


//            }
//        });

        HttpUriRequest httpUriRequest = null;

        Joiner joiner = Joiner.on(",").skipNulls();
        URI requestUri = buildUri(request, joiner);

        httpUriRequest = buildHttpUriRequest(request, joiner, requestUri);

View Full Code Here

            conferenceNames.add(conference.getName());
        }
        if (conferenceNames.size() > 0) {
            StringBuilder announcementStringBuilder = new StringBuilder(
                    "Last chance to attend! The following conferences are nearly sold out: ");
            Joiner joiner = Joiner.on(", ").skipNulls();
            announcementStringBuilder.append(joiner.join(conferenceNames));
            MemcacheService memcacheService = MemcacheServiceFactory.getMemcacheService();
            memcacheService.put(Constants.MEMCACHE_ANNOUNCEMENTS_KEY,
                    announcementStringBuilder.toString());
        }
        response.setStatus(204);
View Full Code Here

        if (conferenceNames.size() > 0) {

            // Build a String that announces the nearly sold-out conferences
            StringBuilder announcementStringBuilder = new StringBuilder(
                    "Last chance to attend! The following conferences are nearly sold out: ");
            Joiner joiner = Joiner.on(", ").skipNulls();
            announcementStringBuilder.append(joiner.join(conferenceNames));

            // Get the Memcache Service
            MemcacheService memcacheService = MemcacheServiceFactory.getMemcacheService();

            // Put the announcement String in memcache,
View Full Code Here

                parent.mkdirs();
           
            s = new PrintStream(f);
        }
       
        Joiner commas = Joiner.on(',');
       
        s.print("imports = ");
        s.println(commas.join(getNonStaticImports()));
       
        s.print("staticimports = ");
        s.println(commas.join(getStaticImports()));
       
        s.close();
    }
View Full Code Here

    private static String parseItemInformation(ItemStack[] items) {
        ItemStack[] stock = InventoryUtil.mergeSimilarStacks(items);

        StringBuilder message = new StringBuilder(15);
        Joiner joiner = Joiner.on(' ');

        for (ItemStack item : stock) {
            joiner.appendTo(message, item.getAmount(), MaterialUtil.getName(item));
        }

        return message.toString();
    }
View Full Code Here

        if (logger.isDebugEnabled()) {
            logger.debug("Sending data: {}", queryMap);
        }

        final Joiner joiner = Joiner.on('=');
        List<String> params = new ArrayList<>(queryMap.size());
        for (Map.Entry<String, String> entry : queryMap.entrySet()) {
            if (entry.getValue() != null) {
                params.add(joiner.join(entry.getKey(), entry.getValue()));
            }
        }
        String query = Joiner.on('&').join(params);

        return new URI(
View Full Code Here

    }

    private static <T> void assertListEquals(List<T> actual, List<T> expected)
    {
        if (actual.size() != expected.size()) {
            Joiner joiner = Joiner.on("\n    ");
            fail(format("Lists not equal%nActual [%s]:%n    %s%nExpected [%s]:%n    %s",
                    actual.size(), joiner.join(actual),
                    expected.size(), joiner.join(expected)));
        }
        assertEquals(actual, expected);
    }
View Full Code Here

                String issueKey = issueNumber;
                if (issueKey.startsWith("#")) {
                    issueKey = issueKey.substring(1);
                }
                if (StringUtils.isNumeric(issueKey) && (getProjectPrefix() != null)) {
                    Joiner joiner = Joiner.on("-");
                    issueKey = joiner.join(getProjectPrefix(), issueKey);
                }
                return issueKey;
            }

View Full Code Here

    private String testFailureHeading() {
        return TEST_FAILED_HEADINGS.get(headingStyle);
    }

    private void logRelatedIssues(TestOutcome result) {
        Joiner joiner = Joiner.on(",");
        getLogger().info("RELATED ISSUES: " + joiner.join(result.getIssueKeys()));

    }
View Full Code Here

TOP

Related Classes of com.google.common.base.Joiner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.