/** * Constructs a new <tt>RequireHashCode</tt> processor, which converts the input to a String, and ensures that the * input's hash function matches any of a given set of hashcodes. * * @param requiredHashcodes * one or more hashcodes * @throws NullPointerException * if requiredHashcodes is null * @throws IllegalArgumentException * if requiredHashcodes is empty */ public RequireHashCode(final int... requiredHashcodes) { super(); checkPreconditions(requiredHashcodes); for( final int hash : requiredHashcodes ) { this.requiredHashCodes.add(hash); } }
/** * Constructs a new <tt>RequireHashCode</tt> processor, which converts the input to a String, ensures that the * input's hash function matches any of a given set of hashcodes, then calls the next processor in the chain. * * @param requiredHashcodes * one or more hashcodes * @param next * the next processor in the chain * @throws NullPointerException * if requiredHashcodes or next is null * @throws IllegalArgumentException * if requiredHashcodes is empty */ public RequireHashCode(final int[] requiredHashcodes, final CellProcessor next) { super(next); checkPreconditions(requiredHashcodes); for( final int hash : requiredHashcodes ) { this.requiredHashCodes.add(hash); } }