All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.xlrit.gears.base.choice.ListChoices Maven / Gradle / Ivy

There is a newer version: 1.17.5
Show newest version
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();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy