Beetl工具包扩展
parent
18355fb691
commit
c7cfbb102a
@ -1,26 +1,26 @@
|
|||||||
package com.ibeetl.admin.core.util.beetl;
|
//package com.ibeetl.admin.core.util.beetl;
|
||||||
|
//
|
||||||
import org.beetl.core.Context;
|
//import org.beetl.core.Context;
|
||||||
import org.beetl.core.Function;
|
//import org.beetl.core.Function;
|
||||||
import org.springframework.stereotype.Component;
|
//import org.springframework.stereotype.Component;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 忽略大小写的比较
|
// * 忽略大小写的比较
|
||||||
*/
|
// */
|
||||||
@Component
|
//@Component
|
||||||
public class EqualsIgnoreCaseFunction implements Function {
|
//public class EqualsIgnoreCaseFunction implements Function {
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public Object call(Object[] objects, Context context) {
|
// public Object call(Object[] objects, Context context) {
|
||||||
try{
|
// try{
|
||||||
if(objects != null && objects.length == 2){
|
// if(objects != null && objects.length == 2){
|
||||||
String left = objects[0].toString();
|
// String left = objects[0].toString();
|
||||||
String right = objects[1].toString();
|
// String right = objects[1].toString();
|
||||||
return left.equalsIgnoreCase(right);
|
// return left.equalsIgnoreCase(right);
|
||||||
}
|
// }
|
||||||
}catch (Exception e){
|
// }catch (Exception e){
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
Loading…
Reference in New Issue