mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PathInterner.getAllPaths
This commit is contained in:
@@ -22,9 +22,7 @@ import gnu.trove.TObjectIntHashMap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
@@ -174,6 +172,16 @@ public class PathInterner {
|
||||
myIdxToSeq.add(null);
|
||||
}
|
||||
|
||||
public List<String> getAllPaths() {
|
||||
ArrayList<String> result = new ArrayList<String>(myIdxToSeq.size() - 1);
|
||||
for (SubstringWrapper[] wrappers : myIdxToSeq) {
|
||||
if (wrappers != null) {
|
||||
result.add(PathInterner.restorePath(wrappers));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public int addPath(String path) {
|
||||
PathInterner.SubstringWrapper[] seq = myInterner.internParts(path, true);
|
||||
if (!mySeqToIdx.containsKey(seq)) {
|
||||
|
||||
Reference in New Issue
Block a user