io.contek.zeus.IndexSymbol Maven / Gradle / Ivy
package io.contek.zeus;
import com.google.common.collect.ImmutableSet;
import javax.annotation.concurrent.Immutable;
import java.util.Collection;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
@Immutable
public final class IndexSymbol extends StringKey {
private IndexSymbol(String stringValue) {
super(stringValue);
}
public static IndexSymbol of(String symbol) {
return new IndexSymbol(symbol);
}
public static ImmutableSet setOf(Collection stringValues) {
return stringValues.stream().map(IndexSymbol::of).collect(toImmutableSet());
}
}