- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for getPathComparator (0.2 sec)
-
platforms/core-execution/snapshots/src/test/groovy/org/gradle/internal/snapshot/CaseSensitiveVfsRelativePathTest.groovy
import static org.gradle.internal.snapshot.PathUtil.getPathComparator class CaseSensitiveVfsRelativePathTest extends AbstractCaseVfsRelativePathTest { def "finds right entry in sorted list with only case differences"() { def children = ["bAd", "BaD", "Bad"] children.sort(getPathComparator(CASE_SENSITIVE)) expect: for (int i = 0; i < children.size(); i++) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:34:50 UTC 2023 - 3.4K bytes - Viewed (0) -
platforms/core-execution/snapshots/src/main/java/org/gradle/internal/snapshot/ChildMapFactory.java
List<ChildMap.Entry<T>> sortedEntries = new ArrayList<>(entries); sortedEntries.sort(Comparator.comparing(ChildMap.Entry::getPath, PathUtil.getPathComparator(caseSensitivity))); return childMapFromSorted(sortedEntries); } public static <T> ChildMap<T> childMapFromSorted(List<ChildMap.Entry<T>> sortedEntries) { int size = sortedEntries.size();
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:34:50 UTC 2023 - 2.6K bytes - Viewed (0) -
platforms/core-execution/snapshots/src/test/groovy/org/gradle/internal/snapshot/AbstractCaseVfsRelativePathTest.groovy
import static org.gradle.internal.snapshot.PathUtil.compareCharsIgnoringCase import static org.gradle.internal.snapshot.PathUtil.equalChars import static org.gradle.internal.snapshot.PathUtil.getPathComparator abstract class AbstractCaseVfsRelativePathTest extends Specification { abstract CaseSensitivity getCaseSensitivity() def "length of common prefix of #prefix and #absolutePath is #result"() {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:34:50 UTC 2023 - 9.3K bytes - Viewed (0) -
platforms/core-execution/snapshots/src/main/java/org/gradle/internal/snapshot/PathUtil.java
* * When the two paths are different ignoring the case, then the result of the comparison is the same for both comparators. */ public static Comparator<String> getPathComparator(CaseSensitivity caseSensitivity) { switch (caseSensitivity) { case CASE_SENSITIVE: return CASE_SENSITIVE_COMPARATOR; case CASE_INSENSITIVE:
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:34:50 UTC 2023 - 8.2K bytes - Viewed (0) -
platforms/core-execution/snapshots/src/test/groovy/org/gradle/internal/snapshot/AbstractFileSystemNodeWithChildrenTest.groovy
} } ChildMap<CHILD> createChildren(List<String> pathsToParent) { return ChildMapFactory.childMapFromSorted(pathsToParent.stream() .sorted(PathUtil.getPathComparator(CASE_SENSITIVE)) .map { childPath -> new ChildMap.Entry(childPath, mockChild()) } .collect(Collectors.toList())) } ChildMap<CHILD> childrenWithSelectedChildReplacedBy(CHILD replacement) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:34:50 UTC 2023 - 9.3K bytes - Viewed (0) -
platforms/core-execution/snapshots/src/test/groovy/org/gradle/internal/snapshot/AbstractIncompleteFileSystemNodeTest.groovy
where: vfsSpec << CHILD_IS_PREFIX } static ChildMap<FileSystemNode> sortedChildren(String path1, FileSystemNode child1, String path2, FileSystemNode child2) { def compared = PathUtil.getPathComparator(CASE_SENSITIVE).compare(path1, path2) def entry1 = new ChildMap.Entry<FileSystemNode>(path1, child1) def entry2 = new ChildMap.Entry<FileSystemNode>(path2, child2)
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:34:50 UTC 2023 - 13.3K bytes - Viewed (0)