Enum Class PathNormalization
- All Implemented Interfaces:
com.google.common.base.Function<String,String>, Serializable, Comparable<PathNormalization>, Constable, Function<String, String>
public enum PathNormalization
extends Enum<PathNormalization>
implements com.google.common.base.Function<String,String>
Normalizations that can be applied to names in paths. Includes Unicode normalizations and
normalizations for case insensitive paths. These normalizations can be set in
Configuration.Builder when creating a Jimfs file system instance and are automatically applied
to paths in the file system.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringApplies this normalization to the given string, returning the normalized result.static PatterncompilePattern(String regex, Iterable<PathNormalization> normalizations) Compiles a regex pattern using flags based on the given normalizations.static Stringnormalize(String string, Iterable<PathNormalization> normalizations) Applies the given normalizations to the given string in order, returning the normalized result.intReturns the flags that should be used when creating a regexPatternin order to approximate this normalization.static PathNormalizationReturns the enum constant of this class with the specified name.static PathNormalization[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface com.google.common.base.Function
equals
-
Enum Constant Details
-
Field Details
-
patternFlags
private final int patternFlags
-
-
Constructor Details
-
PathNormalization
private PathNormalization(int patternFlags)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
apply
-
patternFlags
public int patternFlags()Returns the flags that should be used when creating a regexPatternin order to approximate this normalization. -
normalize
Applies the given normalizations to the given string in order, returning the normalized result. -
compilePattern
Compiles a regex pattern using flags based on the given normalizations.
-