-
- All Implemented Interfaces:
public final class PathFormatExtensions
-
-
Method Summary
Modifier and Type Method Description final static BooleanmatchesBy(String $self, String path, PathFormat pathFormat)根据指定的路径类型,判断当前字符串是否匹配指定的路径。 默认使用标准路径PathFormats.StandardPath。 final static Map<String, String>resolveVariablesBy(String $self, String path, PathFormat pathFormat)根据指定的路径类型,解析路径变量。如果路径不匹配,则返回空结果。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> List<T>queryBy(Array<?> $self, String path, PathFormat pathFormat)根据指定路径和指定路径类型查询当前数组,返回查询结果列表。 如果指定路径为空路径,则目标返回查询对象的单例列表。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> List<T>queryBy(List<?> $self, String path, PathFormat pathFormat)根据指定路径和指定路径类型查询当前列表,返回查询结果列表。 如果指定路径为空路径,则目标返回查询对象的单例列表。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> List<T>queryBy(Map<?, ?> $self, String path, PathFormat pathFormat)根据指定路径和指定路径类型递归查询当前映射,返回查询结果列表。 如果指定路径为空路径,则目标返回查询对象的单例列表。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> TgetBy(Array<?> $self, String path, PathFormat pathFormat)根据指定路径和指定路径类型查询当前数组,得到首个匹配的值,或者抛出异常。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> TgetBy(List<?> $self, String path, PathFormat pathFormat)根据指定路径和指定路径类型查询当前列表,得到首个匹配的值,或者抛出异常。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> TgetBy(Map<?, ?> $self, String path, PathFormat pathFormat)根据指定路径和指定路径类型递归查询当前映射,得到首个匹配的值,或者抛出异常。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> TgetOrNullBy(Array<?> $self, String path, PathFormat pathFormat)根据指定路径和指定路径类型查询当前数组,得到首个匹配的值,或者返回null。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> TgetOrNullBy(List<?> $self, String path, PathFormat pathFormat)根据指定路径和指定路径类型查询当前列表,得到首个匹配的值,或者返回null。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> TgetOrNullBy(Map<?, ?> $self, String path, PathFormat pathFormat)根据指定路径和指定路径类型递归查询当前映射,得到首个匹配的值,或者返回null。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> TgetOrDefaultBy(Array<?> $self, String path, PathFormat pathFormat, T defaultValue)根据指定路径和指定路径类型查询当前数组,得到首个匹配的值,或者返回默认值。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> TgetOrDefaultBy(List<?> $self, String path, PathFormat pathFormat, T defaultValue)根据指定路径和指定路径类型查询当前列表,得到首个匹配的值,或者返回默认值。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> TgetOrDefaultBy(Map<?, ?> $self, String path, PathFormat pathFormat, T defaultValue)根据指定路径和指定路径类型递归查询当前映射,得到首个匹配的值,或者返回默认值。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> TgetOrElseBy(Array<?> $self, String path, PathFormat pathFormat, Function0<T> defaultValue)根据指定路径和指定路径类型查询当前数组,得到首个匹配的值,或者返回默认值。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> TgetOrElseBy(List<?> $self, String path, PathFormat pathFormat, Function0<T> defaultValue)根据指定路径和指定路径类型查询当前列表,得到首个匹配的值,或者返回默认值。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。 final static <T extends Any> TgetOrElseBy(Map<?, ?> $self, String path, PathFormat pathFormat, Function0<T> defaultValue)根据指定路径和指定路径类型递归查询当前映射,得到首个匹配的值,或者返回默认值。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。 -
-
Method Detail
-
matchesBy
final static Boolean matchesBy(String $self, String path, PathFormat pathFormat)
根据指定的路径类型,判断当前字符串是否匹配指定的路径。 默认使用标准路径PathFormats.StandardPath。
-
resolveVariablesBy
final static Map<String, String> resolveVariablesBy(String $self, String path, PathFormat pathFormat)
根据指定的路径类型,解析路径变量。如果路径不匹配,则返回空结果。 默认使用标准路径PathFormats.StandardPath。
-
queryBy
final static <T extends Any> List<T> queryBy(Array<?> $self, String path, PathFormat pathFormat)
根据指定路径和指定路径类型查询当前数组,返回查询结果列表。 如果指定路径为空路径,则目标返回查询对象的单例列表。 默认使用标准路径PathFormats.StandardPath。
-
queryBy
final static <T extends Any> List<T> queryBy(List<?> $self, String path, PathFormat pathFormat)
根据指定路径和指定路径类型查询当前列表,返回查询结果列表。 如果指定路径为空路径,则目标返回查询对象的单例列表。 默认使用标准路径PathFormats.StandardPath。
-
queryBy
final static <T extends Any> List<T> queryBy(Map<?, ?> $self, String path, PathFormat pathFormat)
根据指定路径和指定路径类型递归查询当前映射,返回查询结果列表。 如果指定路径为空路径,则目标返回查询对象的单例列表。 默认使用标准路径PathFormats.StandardPath。
-
getBy
final static <T extends Any> T getBy(Array<?> $self, String path, PathFormat pathFormat)
根据指定路径和指定路径类型查询当前数组,得到首个匹配的值,或者抛出异常。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。
-
getBy
final static <T extends Any> T getBy(List<?> $self, String path, PathFormat pathFormat)
根据指定路径和指定路径类型查询当前列表,得到首个匹配的值,或者抛出异常。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。
-
getBy
final static <T extends Any> T getBy(Map<?, ?> $self, String path, PathFormat pathFormat)
根据指定路径和指定路径类型递归查询当前映射,得到首个匹配的值,或者抛出异常。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。
-
getOrNullBy
final static <T extends Any> T getOrNullBy(Array<?> $self, String path, PathFormat pathFormat)
根据指定路径和指定路径类型查询当前数组,得到首个匹配的值,或者返回null。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。
-
getOrNullBy
final static <T extends Any> T getOrNullBy(List<?> $self, String path, PathFormat pathFormat)
根据指定路径和指定路径类型查询当前列表,得到首个匹配的值,或者返回null。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。
-
getOrNullBy
final static <T extends Any> T getOrNullBy(Map<?, ?> $self, String path, PathFormat pathFormat)
根据指定路径和指定路径类型递归查询当前映射,得到首个匹配的值,或者返回null。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。
-
getOrDefaultBy
final static <T extends Any> T getOrDefaultBy(Array<?> $self, String path, PathFormat pathFormat, T defaultValue)
根据指定路径和指定路径类型查询当前数组,得到首个匹配的值,或者返回默认值。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。
-
getOrDefaultBy
final static <T extends Any> T getOrDefaultBy(List<?> $self, String path, PathFormat pathFormat, T defaultValue)
根据指定路径和指定路径类型查询当前列表,得到首个匹配的值,或者返回默认值。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。
-
getOrDefaultBy
final static <T extends Any> T getOrDefaultBy(Map<?, ?> $self, String path, PathFormat pathFormat, T defaultValue)
根据指定路径和指定路径类型递归查询当前映射,得到首个匹配的值,或者返回默认值。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。
-
getOrElseBy
final static <T extends Any> T getOrElseBy(Array<?> $self, String path, PathFormat pathFormat, Function0<T> defaultValue)
根据指定路径和指定路径类型查询当前数组,得到首个匹配的值,或者返回默认值。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。
-
getOrElseBy
final static <T extends Any> T getOrElseBy(List<?> $self, String path, PathFormat pathFormat, Function0<T> defaultValue)
根据指定路径和指定路径类型查询当前列表,得到首个匹配的值,或者返回默认值。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。
-
getOrElseBy
final static <T extends Any> T getOrElseBy(Map<?, ?> $self, String path, PathFormat pathFormat, Function0<T> defaultValue)
根据指定路径和指定路径类型递归查询当前映射,得到首个匹配的值,或者返回默认值。 如果指定路径为空路径,则目标返回查询对象本身。 默认使用标准路径PathFormats.StandardPath。
-
-
-
-