1 55 56 package org.apache.commons.el; 57 58 65 66 public class BooleanLiteral 67 extends Literal 68 { 69 73 public static final BooleanLiteral TRUE = new BooleanLiteral ("true"); 74 public static final BooleanLiteral FALSE = new BooleanLiteral ("false"); 75 76 81 public BooleanLiteral (String pToken) 82 { 83 super (getValueFromToken (pToken)); 84 } 85 86 91 static Object getValueFromToken (String pToken) 92 { 93 return 94 ("true".equals (pToken)) ? 95 Boolean.TRUE : 96 Boolean.FALSE; 97 } 98 99 106 public String getExpressionString () 107 { 108 return (getValue () == Boolean.TRUE) ? "true" : "false"; 109 } 110 111 } 113 | Popular Tags |