Beispiel #1
0
 public Boolean asBoolean() {
   if (isBoolean()) {
     return Type.TRUE.equals(this.type);
   } else {
     throw new RuntimeException("cant cast to boolean");
   }
 }
Beispiel #2
0
 public boolean isBoolean() {
   return Type.FALSE.equals(this.type) || Type.TRUE.equals(this.type);
 }