com.brsanthu.googleanalytics.GaUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-analytics-java Show documentation
Show all versions of google-analytics-java Show documentation
This is Java API for Google Analytics (Measurement Protocol). More information about the protocol is available at https://developers.google.com/analytics/devguides/collection/protocol/v1/.
package com.brsanthu.googleanalytics;
public class GaUtils {
public static boolean isNotEmpty(String value) {
return !isEmpty(value);
}
public static boolean isEmpty(String value) {
return value == null || value.trim().length() == 0;
}
public static StringBuilder appendSystemProperty(StringBuilder sb, String property) {
String value = System.getProperty(property);
if (isNotEmpty(value)) {
if (isNotEmpty(sb.toString())) {
sb.append("/");
}
sb.append(value);
}
return sb;
}
}