io.github.amayaframework.options.ClosedOptionSet Maven / Gradle / Ivy
The newest version!
package io.github.amayaframework.options;
import com.github.romanqed.jfunc.Runnable1;
import java.util.*;
import java.util.function.Supplier;
/**
* The implementation of {@link OptionSet} that accepts keys only from limited key set.
*/
public class ClosedOptionSet extends AbstractOptionSet {
private final Set keys;
/**
* Constructs {@link ClosedOptionSet} instance with the map given by supplier and the specified key set.
*
* @param supplier supplier providing key-value map instance
* @param keys the specified key set
*/
public ClosedOptionSet(Supplier