com.greenpineyu.fel.function.operator
类 CollectionGet
java.lang.Object
com.greenpineyu.fel.function.StableFunction
com.greenpineyu.fel.function.operator.CollectionGet
- 所有已实现的接口:
- Function, Stable
public class CollectionGet
- extends StableFunction
根据索引获取某个集合的值,相当于List.get(i)方法和array[i]方法。 用于处理array[i],list[i]等表达式,
同时也可以处理支持实现了iterator的类,如Set。
- 作者:
- yuqingsong
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CollectionGet
public CollectionGet()
call
public Object call(FelNode node,
FelContext context)
- 从接口
Function 复制的描述
- 调用函数
- 返回:
getName
public String getName()
- 从接口
Function 复制的描述
- 获取函数的名称
- 返回:
toMethod
public SourceBuilder toMethod(FelNode node,
FelContext ctx)
get
public static Object get(Object object,
int index)
getNum
public int[][] getNum()
setNum
public void setNum(int[][] num)
getA
public String[][] getA()
setA
public void setA(String[][] a)
main
public static void main(String[] args)
throws SecurityException,
NoSuchMethodException
- 抛出:
SecurityException
NoSuchMethodException
test
public static void test()
assertEval
public static void assertEval(String exp,
FelEngine engine,
Object expected)
assertCompile
public static void assertCompile(String exp,
FelEngine engine,
Object expected)
Copyright © 2013. All Rights Reserved.