Adds speeds to monster card.

This commit is contained in:
2020-09-01 21:17:36 -07:00
parent f607954ce6
commit 03af5c3aa7
5 changed files with 152 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
package com.majinnaibu.monstercards.helpers;
@SuppressWarnings({"BooleanMethodIsAlwaysInverted", "RedundantIfStatement"})
import java.util.Collection;
@SuppressWarnings({"RedundantIfStatement"})
public final class StringHelper {
public static boolean isNullOrEmpty(CharSequence value) {
if (value == null) {
@@ -13,4 +15,24 @@ public final class StringHelper {
return false;
}
public static String join(String delimiter, Collection<String> strings) {
int length = strings.size();
if (length < 1) {
return "";
} else {
StringBuilder sb = new StringBuilder();
boolean isFirst = true;
for (String element : strings) {
if (!isFirst) {
sb.append(delimiter);
}
sb.append(element);
isFirst = false;
}
return sb.toString();
}
}
}