/** * Constructs a new <tt>Strlen</tt> processor, which ensures that the input String has a length equal to any of the * supplied lengths. * * @param requiredLengths * one or more required lengths * @throws NullPointerException * if requiredLengths is null * @throws IllegalArgumentException * if requiredLengths is empty or contains a negative length */ public Strlen(final int... requiredLengths) { super(); checkPreconditions(requiredLengths); checkAndAddLengths(requiredLengths); }
/** * Constructs a new <tt>Strlen</tt> processor, which ensures that the input String has a length equal to any of the * supplied lengths, then calls the next processor in the chain. * * @param requiredLengths * one or more required lengths * @param next * the next processor in the chain * @throws NullPointerException * if requiredLengths or next is null * @throws IllegalArgumentException * if requiredLengths is empty or contains a negative length */ public Strlen(final int[] requiredLengths, final CellProcessor next) { super(next); checkPreconditions(requiredLengths); checkAndAddLengths(requiredLengths); }