boolean () { return switch (constType.getType()) { case CodeConstants.TYPE_BOOLEAN, CodeConstants.TYPE_CHAR, CodeConstants.TYPE_BYTE, CodeConstants.TYPE_BYTECHAR, CodeConstants.TYPE_SHORT, CodeConstants.TYPE_SHORTCHAR, CodeConstants.TYPE_INT -> (Integer)value == 1; case CodeConstants.TYPE_LONG -> ((Long)value).intValue() == 1; case CodeConstants.TYPE_DOUBLE -> ((Double)value).intValue() == 1; case CodeConstants.TYPE_FLOAT -> ((Float)value).intValue() == 1; default -> false; }; }