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