程序包 org.antlr.misc
类 Utils
- java.lang.Object
-
- org.antlr.misc.Utils
-
public class Utils extends java.lang.Object
-
-
字段概要
字段 修饰符和类型 字段 说明 static int
INTEGER_POOL_MAX_VALUE
-
构造器概要
构造器 构造器 说明 Utils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static java.lang.Integer
integer(int x)
Integer objects are immutable so share all Integers with the same value up to some max size.static java.lang.String
replace(java.lang.String src, java.lang.String replacee, java.lang.String replacer)
Given a source string, src, a string to replace, replacee, and a string to replace with, replacer, return a new string w/ the replacing done.
-
-
-
字段详细资料
-
INTEGER_POOL_MAX_VALUE
public static final int INTEGER_POOL_MAX_VALUE
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
integer
public static java.lang.Integer integer(int x)
Integer objects are immutable so share all Integers with the same value up to some max size. Use an array as a perfect hash. Return shared object for 0..INTEGER_POOL_MAX_VALUE or a new Integer object with x in it.
-
replace
public static java.lang.String replace(java.lang.String src, java.lang.String replacee, java.lang.String replacer)
Given a source string, src, a string to replace, replacee, and a string to replace with, replacer, return a new string w/ the replacing done. You can use replacer==null to remove replacee from the string. This should be faster than Java's String.replaceAll as that one uses regex (I only want to play with strings anyway).
-
-