com.acsinet_solutions.util.regexp
Enum Substitution

java.lang.Object
  extended by java.lang.Enum<Substitution>
      extended by com.acsinet_solutions.util.regexp.Substitution
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Substitution>

public enum Substitution
extends java.lang.Enum<Substitution>

Substitution types for regular expression substitution.

Author:
Santiago Arriaga
See Also:
com.acsinet_solutions.util.regexp.Perl5Regexp#substitute(String,String,Substitution)

Enum Constant Summary
NO_EXCEPTION
          No exception on mismatch constant.
PARTIAL
          Partial substitution constant.
 
Method Summary
static Substitution valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Substitution[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PARTIAL

public static final Substitution PARTIAL
Partial substitution constant. The substitution pattern will be applied just once to the input string, and not globally.


NO_EXCEPTION

public static final Substitution NO_EXCEPTION
No exception on mismatch constant. A mismatch on the substitution attempt will not throw an exception.

Method Detail

values

public static final Substitution[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Substitution c : Substitution.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Substitution valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name