com.xlrit.gears.base.choice.ListChoices Maven / Gradle / Ivy
package com.xlrit.gears.base.choice;
import java.util.List;
import java.util.stream.Stream;
import com.xlrit.gears.base.choice.Choice;
import com.xlrit.gears.base.choice.Choices;
public class ListChoices implements Choices {
private final Kind kind;
private final List items;
public ListChoices(Kind kind, List items) {
this.kind = kind;
this.items = items;
}
@Override
public Kind kind() {
return kind;
}
@Override
public int count() {
return items.size();
}
@Override
public Stream items() {
return items.stream();
}
}