mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Run automatic Java 8 conversion over codebase
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=171174380
This commit is contained in:
parent
44df5da771
commit
5edb7935ed
190 changed files with 2312 additions and 3096 deletions
|
@ -14,8 +14,8 @@
|
|||
|
||||
package google.registry.util;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
|
@ -59,13 +59,11 @@ public final class TokenUtils {
|
|||
final TokenType type,
|
||||
StringGenerator generator,
|
||||
int count) {
|
||||
return FluentIterable.from(generator.createStrings(type.getLength(), count))
|
||||
.transform(new Function<String, String>() {
|
||||
@Override
|
||||
public String apply(String token) {
|
||||
return String.format("%s_%s", type.getPrefix(), token);
|
||||
}})
|
||||
.toSet();
|
||||
return generator
|
||||
.createStrings(type.getLength(), count)
|
||||
.stream()
|
||||
.map(token -> String.format("%s_%s", type.getPrefix(), token))
|
||||
.collect(toImmutableSet());
|
||||
}
|
||||
|
||||
private TokenUtils() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue