blob: 1a92d6d15bcd08aa0b7b003cf128d50ab7378b26 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package com.juick.server.util;
import com.juick.Tag;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.List;
import java.util.stream.Collectors;
/**
* Created by aalexeev on 11/13/16.
*/
public class TagUtils {
private TagUtils() {
throw new IllegalStateException();
}
public static String toString(final List<Tag> tags) {
if (CollectionUtils.isEmpty(tags))
return StringUtils.EMPTY;
return tags.stream().map(t -> " *" + t.getName())
.collect(Collectors.joining());
}
}
|