java.lang.Object
ushiosan.jvm.internal.validators.UResourceValidator
ushiosan.jvm.internal.filesystem.UResourceImpl
- Direct Known Subclasses:
UResource
-
Field Summary
Fields inherited from class ushiosan.jvm.internal.validators.UResourceValidator
FS_DEFAULT_ALGORITHM, FS_EMPTY_EXTENSIONS, FS_EXTENSION_IDENTIFIER, FS_RESOURCE_BUFFER_SIZE_STANDARD, FS_STANDARD_FILE_SEPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextensionsEntryOf(boolean inverted, String @NotNull ... extensions) Generates a filter to capture the elements that meet said restrictionextensionsFileOf(boolean inverted, String @NotNull ... extensions) Generates a filter to capture the elements that meet said restrictionextensionsPathOf(boolean inverted, String @NotNull ... extensions) Generates a filter to capture the elements that meet said restrictionjrtFileAccess(@NotNull URI uri) Gets the file path within aURIobject for ajrt:/filesystemjrtModuleName(@NotNull URI uri) Gets the file module within aURIobject for ajrt:/filesystemnamedEntryOf(boolean inverted, String @NotNull ... names) Generates a filter to capture the elements that meet said restrictionnamedFileOf(boolean inverted, String @NotNull ... names) Generates a filter to capture the elements that meet said restrictionnamedPathOf(boolean inverted, String @NotNull ... names) Generates a filter to capture the elements that meet said restrictionregexEntryOf(@NotNull String pattern, boolean fullPath, boolean inverted, int @NotNull ... flags) Generates a filter to capture the elements that meet said restrictionregexEntryOf(@NotNull String pattern, boolean fullPath, int @NotNull ... flags) Generates a filter to capture the elements that meet said restrictionregexEntryOf(@NotNull Pattern pattern, boolean fullPath, boolean inverted) Generates a filter to capture the elements that meet said restrictionregexFileOf(@NotNull String pattern, boolean fullPath, boolean inverted, int @NotNull ... flags) Generates a filter to capture the elements that meet said restrictionregexFileOf(@NotNull String pattern, boolean fullPath, int @NotNull ... flags) Generates a filter to capture the elements that meet said restrictionregexFileOf(@NotNull Pattern pattern, boolean fullPath, boolean inverted) Generates a filter to capture the elements that meet said restrictionregexPathOf(@NotNull String pattern, boolean fullPath, boolean inverted, int @NotNull ... flags) Generates a filter to capture the elements that meet said restrictionregexPathOf(@NotNull String pattern, boolean fullPath, int @NotNull ... flags) Generates a filter to capture the elements that meet said restrictionregexPathOf(@NotNull Pattern pattern, boolean fullPath, boolean inverted) Generates a filter to capture the elements that meet said restrictionMethods inherited from class ushiosan.jvm.internal.validators.UResourceValidator
allExtensionsImpl, basenameImpl, createByteBuffer, extensionImpl, nameWithoutSlashesImpl, resourceHashImpl
-
Constructor Details
-
UResourceImpl
public UResourceImpl()
-
-
Method Details
-
regexPathOf
@NotNull public static <T extends Path> @NotNull Predicate<T> regexPathOf(@NotNull @RegExp @NotNull String pattern, boolean fullPath, boolean inverted, @MagicConstant(flagsFromClass=java.util.regex.Pattern.class) int @NotNull ... flags) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
pattern- regular expression to applyfullPath- property used to parse the full path or just the file name for matchesinverted- option to perform the action invertedflags- regular expression configuration flags- Returns:
- the filter instance with the desired behavior
- See Also:
-
regexPathOf
@NotNull public static <T extends Path> @NotNull Predicate<T> regexPathOf(@NotNull @RegExp @NotNull String pattern, boolean fullPath, @MagicConstant(flagsFromClass=java.util.regex.Pattern.class) int @NotNull ... flags) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
pattern- regular expression to applyfullPath- property used to parse the full path or just the file name for matchesflags- regular expression configuration flags- Returns:
- the filter instance with the desired behavior
- See Also:
-
regexPathOf
@NotNull public static <T extends Path> @NotNull Predicate<T> regexPathOf(@NotNull @NotNull Pattern pattern, boolean fullPath, boolean inverted) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
pattern- regular expression to applyfullPath- property used to parse the full path or just the file name for matchesinverted- option to perform the action inverted- Returns:
- the filter instance with the desired behavior
- See Also:
-
namedPathOf
@NotNull public static <T extends Path> @NotNull Predicate<T> namedPathOf(boolean inverted, String @NotNull ... names) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
names- the resource possible namesinverted- option to perform the action inverted- Returns:
- the filter instance with the desired behavior
-
extensionsPathOf
@NotNull public static <T extends Path> @NotNull Predicate<T> extensionsPathOf(boolean inverted, String @NotNull ... extensions) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
extensions- the resource possible extensionsinverted- option to perform the action inverted- Returns:
- the filter instance with the desired behavior
-
regexFileOf
@NotNull public static <T extends File> @NotNull Predicate<T> regexFileOf(@NotNull @RegExp @NotNull String pattern, boolean fullPath, boolean inverted, @MagicConstant(flagsFromClass=java.util.regex.Pattern.class) int @NotNull ... flags) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
pattern- regular expression to applyfullPath- property used to parse the full path or just the file name for matchesinverted- option to perform the action invertedflags- regular expression configuration flags- Returns:
- the filter instance with the desired behavior
- See Also:
-
regexFileOf
@NotNull public static <T extends File> @NotNull Predicate<T> regexFileOf(@NotNull @RegExp @NotNull String pattern, boolean fullPath, @MagicConstant(flagsFromClass=java.util.regex.Pattern.class) int @NotNull ... flags) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
pattern- regular expression to applyfullPath- property used to parse the full path or just the file name for matchesflags- regular expression configuration flags- Returns:
- the filter instance with the desired behavior
- See Also:
-
regexFileOf
@NotNull public static <T extends File> @NotNull Predicate<T> regexFileOf(@NotNull @NotNull Pattern pattern, boolean fullPath, boolean inverted) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
pattern- regular expression to applyfullPath- property used to parse the full path or just the file name for matchesinverted- option to perform the action inverted- Returns:
- the filter instance with the desired behavior
- See Also:
-
namedFileOf
@NotNull public static <T extends File> @NotNull Predicate<T> namedFileOf(boolean inverted, String @NotNull ... names) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
names- the resource possible namesinverted- option to perform the action inverted- Returns:
- the filter instance with the desired behavior
-
extensionsFileOf
@NotNull public static <T extends File> @NotNull Predicate<T> extensionsFileOf(boolean inverted, String @NotNull ... extensions) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
extensions- the resource possible extensionsinverted- option to perform the action inverted- Returns:
- the filter instance with the desired behavior
-
regexEntryOf
@NotNull public static <T extends ZipEntry> @NotNull Predicate<T> regexEntryOf(@NotNull @RegExp @NotNull String pattern, boolean fullPath, boolean inverted, @MagicConstant(flagsFromClass=java.util.regex.Pattern.class) int @NotNull ... flags) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
pattern- regular expression to applyfullPath- property used to parse the full path or just the file name for matchesinverted- option to perform the action invertedflags- regular expression configuration flags- Returns:
- the filter instance with the desired behavior
- See Also:
-
regexEntryOf
@NotNull public static <T extends ZipEntry> @NotNull Predicate<T> regexEntryOf(@NotNull @RegExp @NotNull String pattern, boolean fullPath, @MagicConstant(flagsFromClass=java.util.regex.Pattern.class) int @NotNull ... flags) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
pattern- regular expression to applyfullPath- property used to parse the full path or just the file name for matchesflags- regular expression configuration flags- Returns:
- the filter instance with the desired behavior
- See Also:
-
regexEntryOf
@NotNull public static <T extends ZipEntry> @NotNull Predicate<T> regexEntryOf(@NotNull @NotNull Pattern pattern, boolean fullPath, boolean inverted) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
pattern- regular expression to applyfullPath- property used to parse the full path or just the file name for matchesinverted- option to perform the action inverted- Returns:
- the filter instance with the desired behavior
- See Also:
-
namedEntryOf
@NotNull public static <T extends ZipEntry> @NotNull Predicate<T> namedEntryOf(boolean inverted, String @NotNull ... names) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
names- the resource possible namesinverted- option to perform the action inverted- Returns:
- the filter instance with the desired behavior
-
extensionsEntryOf
@NotNull public static <T extends ZipEntry> @NotNull Predicate<T> extensionsEntryOf(boolean inverted, String @NotNull ... extensions) Generates a filter to capture the elements that meet said restriction- Type Parameters:
T- generic member type- Parameters:
extensions- the resource possible extensionsinverted- option to perform the action inverted- Returns:
- the filter instance with the desired behavior
-
jrtModuleName
Gets the file module within aURIobject for ajrt:/filesystem- Parameters:
uri- the URI where the file is located- Returns:
- the file module name or
Optional.empty()if the module is not found.
-
jrtFileAccess
Gets the file path within aURIobject for ajrt:/filesystem- Parameters:
uri- the URI where the file is located- Returns:
- the file path or empty text if the file is not found.
-