/** * Constructs a new <tt>IsIncludedIn</tt> processor, which ensures that the input value belongs to a specific set of * given values. * * @param possibleValues * the Set of values * @throws NullPointerException * if possibleValues is null * @throws IllegalArgumentException * if possibleValues is empty */ public IsIncludedIn(final Set<Object> possibleValues) { super(); checkPreconditions(possibleValues); this.possibleValues.addAll(possibleValues); }
/** * Constructs a new <tt>IsIncludedIn</tt> processor, which ensures that the input value belongs to a specific set of * given values. * * @param possibleValues * the array of values * @throws NullPointerException * if possibleValues is null * @throws IllegalArgumentException * if possibleValues is empty */ public IsIncludedIn(final Object[] possibleValues) { super(); checkPreconditions(possibleValues); Collections.addAll(this.possibleValues, possibleValues); }
/** * Constructs a new <tt>IsIncludedIn</tt> processor, which ensures that the input value belongs to a specific set of * given values, then calls the next processor in the chain. * * @param possibleValues * the array of values * @param next * the next processor in the chain * @throws NullPointerException * if possibleValues or next is null * @throws IllegalArgumentException * if possibleValues is empty */ public IsIncludedIn(final Object[] possibleValues, final CellProcessor next) { super(next); checkPreconditions(possibleValues); Collections.addAll(this.possibleValues, possibleValues); }
/** * Constructs a new <tt>IsIncludedIn</tt> processor, which ensures that the input value belongs to a specific set of * given values, then calls the next processor in the chain. * * @param possibleValues * the Set of values * @param next * the next processor in the chain * @throws NullPointerException * if possibleValues or next is null * @throws IllegalArgumentException * if possibleValues is empty */ public IsIncludedIn(final Set<Object> possibleValues, final CellProcessor next) { super(next); checkPreconditions(possibleValues); this.possibleValues.addAll(possibleValues); }