Package org.antlr.v4.runtime.misc
Class Utils
java.lang.Object
org.antlr.v4.runtime.misc.Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
static String
escapeWhitespace
(String s, boolean escapeSpaces) static String
expandTabs
(String s, int tabSize) static <T> String
static <T> String
static String
newlines
(int n) static int
numNonnull
(Object[] data) static char[]
static char[]
static <T> void
removeAllElements
(Collection<T> data, T value) static String
static String
spaces
(int n) static char[]
toCharArray
(IntegerList data) Convert array of strings to string→index map.static IntervalSet
static void
static void
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
join
-
join
-
numNonnull
-
removeAllElements
-
escapeWhitespace
-
writeFile
- Throws:
IOException
-
writeFile
- Throws:
IOException
-
readFile
- Throws:
IOException
-
readFile
- Throws:
IOException
-
toMap
Convert array of strings to string→index map. Useful for converting rulenames to name→ruleindex map. -
toCharArray
-
toSet
-
expandTabs
- Since:
- 4.6
-
spaces
- Since:
- 4.6
-
newlines
- Since:
- 4.6
-
sequence
- Since:
- 4.6
-
count
- Since:
- 4.6
-