/** * Alter the current regular expression being utilised for entry parsing * and create a new {@link Pattern} instance. * @param regex The new regular expression * @return true * @since 2.0 * @throws IllegalArgumentException if the regex cannot be compiled */ public boolean setRegex(final String regex) { compileRegex(regex, 0); return true; }
/** * Alter the current regular expression being utilised for entry parsing * and create a new {@link Pattern} instance. * @param regex The new regular expression * @param flags the flags to apply, see {@link Pattern#compile(String, int)}. Use 0 for none. * @return true * @since 3.4 * @throws IllegalArgumentException if the regex cannot be compiled */ public boolean setRegex(final String regex, final int flags) { compileRegex(regex, flags); return true; }
/** * The constructor for a RegexFTPFileEntryParserImpl object. * The expression is compiled with flags = 0. * * @param regex The regular expression with which this object is * initialized. * * @throws IllegalArgumentException * Thrown if the regular expression is unparseable. Should not be seen in * normal conditions. It it is seen, this is a sign that a subclass has * been created with a bad regular expression. Since the parser must be * created before use, this means that any bad parser subclasses created * from this will bomb very quickly, leading to easy detection. */ public RegexFTPFileEntryParserImpl(String regex) { super(); compileRegex(regex, 0); }
/** * The constructor for a RegexFTPFileEntryParserImpl object. * * @param regex The regular expression with which this object is * initialized. * @param flags the flags to apply, see {@link Pattern#compile(String, int)}. Use 0 for none. * * @throws IllegalArgumentException * Thrown if the regular expression is unparseable. Should not be seen in * normal conditions. It it is seen, this is a sign that a subclass has * been created with a bad regular expression. Since the parser must be * created before use, this means that any bad parser subclasses created * from this will bomb very quickly, leading to easy detection. * @since 3.4 */ public RegexFTPFileEntryParserImpl(String regex, final int flags) { super(); compileRegex(regex, flags); }