comparison core/src/luan/modules/TableLuan.java @ 274:8afe9f2fdfec

AB testing, not fully tested git-svn-id: https://luan-java.googlecode.com/svn/trunk@275 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Mon, 10 Nov 2014 03:28:32 +0000
parents b76fcb72d97d
children 899253043270
comparison
equal deleted inserted replaced
273:073044e3ac03 274:8afe9f2fdfec
18 18
19 public static final LuanFunction LOADER = new LuanFunction() { 19 public static final LuanFunction LOADER = new LuanFunction() {
20 @Override public Object call(LuanState luan,Object[] args) { 20 @Override public Object call(LuanState luan,Object[] args) {
21 LuanTable module = Luan.newTable(); 21 LuanTable module = Luan.newTable();
22 try { 22 try {
23 add( module, "clone", LuanTable.class );
23 add( module, "concat", LuanState.class, LuanTable.class, String.class, Integer.class, Integer.class ); 24 add( module, "concat", LuanState.class, LuanTable.class, String.class, Integer.class, Integer.class );
24 add( module, "insert", LuanTable.class, Integer.TYPE, Object.class ); 25 add( module, "insert", LuanTable.class, Integer.TYPE, Object.class );
25 add( module, "pack", new Object[0].getClass() ); 26 add( module, "pack", new Object[0].getClass() );
26 add( module, "remove", LuanTable.class, Integer.TYPE ); 27 add( module, "remove", LuanTable.class, Integer.TYPE );
27 add( module, "sort", LuanState.class, LuanTable.class, LuanFunction.class ); 28 add( module, "sort", LuanState.class, LuanTable.class, LuanFunction.class );
131 132
132 public static LuanTable sub_list(LuanTable list,int from,int to) { 133 public static LuanTable sub_list(LuanTable list,int from,int to) {
133 return list.subList(from,to); 134 return list.subList(from,to);
134 } 135 }
135 136
137 public static LuanTable clone(LuanTable tbl) {
138 return tbl.cloneTable();
139 }
140
136 } 141 }