public enum PathNormalization extends Enum<PathNormalization> implements com.google.common.base.Function<String,String>
Configuration.Builder
when creating a Jimfs file system instance and are automatically
applied to paths in the file system.Enum Constant and Description |
---|
CASE_FOLD_ASCII
ASCII case folding for simple case insensitive paths.
|
CASE_FOLD_UNICODE
Unicode case folding for case insensitive paths.
|
NFC
Unicode composed normalization (form NFC).
|
NFD
Unicode decomposed normalization (form NFD).
|
NONE
No normalization.
|
Modifier and Type | Method and Description |
---|---|
abstract String |
apply(String string)
Applies this normalization to the given string, returning the normalized result.
|
static Pattern |
compilePattern(String regex,
Iterable<PathNormalization> normalizations)
Compiles a regex pattern using flags based on the given normalizations.
|
static String |
normalize(String string,
Iterable<PathNormalization> normalizations)
Applies the given normalizations to the given string in order, returning the normalized
result.
|
int |
patternFlags()
Returns the flags that should be used when creating a regex
Pattern in order to
approximate this normalization. |
static PathNormalization |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PathNormalization[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PathNormalization NONE
public static final PathNormalization NFC
public static final PathNormalization NFD
public static final PathNormalization CASE_FOLD_UNICODE
public static final PathNormalization CASE_FOLD_ASCII
public static PathNormalization[] values()
for (PathNormalization c : PathNormalization.values()) System.out.println(c);
public static PathNormalization valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract String apply(String string)
public int patternFlags()
Pattern
in order to
approximate this normalization.public static String normalize(String string, Iterable<PathNormalization> normalizations)
public static Pattern compilePattern(String regex, Iterable<PathNormalization> normalizations)
Copyright © 2013–2018 Google Inc.. All rights reserved.