org.tomitribe.auth.signatures.Join Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gravitee-policy-http-signature Show documentation
Show all versions of gravitee-policy-http-signature Show documentation
Description of the HTTP Signature Gravitee Policy
package org.tomitribe.auth.signatures;
import java.util.Collection;
public enum Join {
;
public static String join(final String delimiter, final Collection collection) {
if (collection.size() == 0) return "";
final StringBuilder sb = new StringBuilder();
for (final Object obj : collection) {
sb.append(obj).append(delimiter);
}
return sb.substring(0, sb.length() - delimiter.length());
}
public static String join(final String delimiter, final Object... collection) {
if (collection.length == 0) return "";
final StringBuilder sb = new StringBuilder();
for (final Object obj : collection) {
sb.append(obj).append(delimiter);
}
return sb.substring(0, sb.length() - delimiter.length());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy