public class Utils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Utils.Filter<T> |
static interface |
Utils.Func0<TResult> |
static interface |
Utils.Func1<T1,TResult> |
Modifier and Type | Field and Description |
---|---|
static int |
INTEGER_POOL_MAX_VALUE |
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static String |
capitalize(String s) |
static String |
decapitalize(String s) |
static <T> T |
find(List<?> ops,
Class<T> cl)
Find exact object type or subclass of cl in list
|
static <T> int |
indexOf(List<? extends T> elems,
Utils.Filter<T> filter) |
static String |
join(Object[] a,
String separator) |
static <T> int |
lastIndexOf(List<? extends T> elems,
Utils.Filter<T> filter) |
static <T extends GrammarAST> |
nodesToStrings(List<T> nodes) |
static <From,To> List<To> |
select(List<From> list,
Utils.Func1<From,To> selector)
apply methodName to list and return list of results.
|
static void |
setSize(List<?> list,
int size) |
static String |
sortLinesInString(String s) |
static String |
stripFileExtension(String name) |
public static final int INTEGER_POOL_MAX_VALUE
public static <T extends GrammarAST> List<String> nodesToStrings(List<T> nodes)
public static <From,To> List<To> select(List<From> list, Utils.Func1<From,To> selector)
public static <T> T find(List<?> ops, Class<T> cl)
public static <T> int indexOf(List<? extends T> elems, Utils.Filter<T> filter)
public static <T> int lastIndexOf(List<? extends T> elems, Utils.Filter<T> filter)
public static void setSize(List<?> list, int size)
Copyright © 1992–2020 ANTLR. All rights reserved.