svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.expressionevaluator / org.gvsig.expressionevaluator.lib / org.gvsig.expressionevaluator.lib.impl / src / main / java / org / gvsig / expressionevaluator / impl / converterstocode / NullToCode.java @ 47175
History | View | Annotate | Download (640 Bytes)
1 |
package org.gvsig.expressionevaluator.impl.converterstocode; |
---|---|
2 |
|
3 |
import java.util.Map; |
4 |
import org.gvsig.expressionevaluator.Code; |
5 |
import org.gvsig.expressionevaluator.CodeBuilder; |
6 |
import org.gvsig.expressionevaluator.ConverterToCode; |
7 |
|
8 |
/**
|
9 |
*
|
10 |
* @author jjdelcerro
|
11 |
*/
|
12 |
public class NullToCode implements ConverterToCode { |
13 |
|
14 |
@Override
|
15 |
public String getName() { |
16 |
return "null"; |
17 |
} |
18 |
|
19 |
@Override
|
20 |
public boolean isApplicable(Object... os) { |
21 |
return os == null || os[0] == null ; |
22 |
} |
23 |
|
24 |
@Override
|
25 |
public Code toCode(CodeBuilder builder, Object obj, Map props) { |
26 |
return builder.constant(null); |
27 |
} |
28 |
|
29 |
|
30 |
|
31 |
} |