@Override protected <T> T internalValueOfString(final String value, final EdmLiteralKind literalKind, final EdmFacets facets, final Class<T> returnType) throws EdmSimpleTypeException { if (validateLiteral(value)) { if (returnType.isAssignableFrom(Boolean.class)) { return returnType.cast(Boolean.valueOf("true".equals(value) || "1".equals(value))); } else { throw new EdmSimpleTypeException(EdmSimpleTypeException.VALUE_TYPE_NOT_SUPPORTED.addContent(returnType)); } } else { throw new EdmSimpleTypeException(EdmSimpleTypeException.LITERAL_ILLEGAL_CONTENT.addContent(value)); } }
return EdmBinary.getInstance(); case Boolean: return EdmBoolean.getInstance(); case Byte: return EdmByte.getInstance();
return EdmBinary.getInstance(); case Boolean: return EdmBoolean.getInstance(); case Byte: return EdmByte.getInstance();
@Override protected <T> T internalValueOfString(final String value, final EdmLiteralKind literalKind, final EdmFacets facets, final Class<T> returnType) throws EdmSimpleTypeException { if (validateLiteral(value)) { if (returnType.isAssignableFrom(Boolean.class)) { return returnType.cast(Boolean.valueOf("true".equals(value) || "1".equals(value))); } else { throw new EdmSimpleTypeException(EdmSimpleTypeException.VALUE_TYPE_NOT_SUPPORTED.addContent(returnType)); } } else { throw new EdmSimpleTypeException(EdmSimpleTypeException.LITERAL_ILLEGAL_CONTENT.addContent(value)); } }
return EdmBinary.getInstance(); case Boolean: return EdmBoolean.getInstance(); case Byte: return EdmByte.getInstance();
@Override protected <T> T internalValueOfString(final String value, final EdmLiteralKind literalKind, final EdmFacets facets, final Class<T> returnType) throws EdmSimpleTypeException { if (validateLiteral(value)) { if (returnType.isAssignableFrom(Boolean.class)) { return returnType.cast(Boolean.valueOf("true".equals(value) || "1".equals(value))); } else { throw new EdmSimpleTypeException(EdmSimpleTypeException.VALUE_TYPE_NOT_SUPPORTED.addContent(returnType)); } } else { throw new EdmSimpleTypeException(EdmSimpleTypeException.LITERAL_ILLEGAL_CONTENT.addContent(value)); } }
&& (node.getEdmType() != EdmSimpleTypeKind.Boolean.getEdmSimpleTypeInstance())) { throw FilterParserExceptionImpl.createTYPE_EXPECTED_AT(EdmBoolean.getInstance(), node.getEdmType(), 1, curExpression);
@Override public boolean validate(final String value, final EdmLiteralKind literalKind, final EdmFacets facets) { return value == null ? facets == null || facets.isNullable() == null || facets.isNullable() : validateLiteral(value); }
&& (node.getEdmType() != EdmSimpleTypeKind.Boolean.getEdmSimpleTypeInstance())) { throw FilterParserExceptionImpl.createTYPE_EXPECTED_AT(EdmBoolean.getInstance(), node.getEdmType(), 1, curExpression);
@Override public boolean validate(final String value, final EdmLiteralKind literalKind, final EdmFacets facets) { return value == null ? facets == null || facets.isNullable() == null || facets.isNullable() : validateLiteral(value); }
&& (node.getEdmType() != EdmSimpleTypeKind.Boolean.getEdmSimpleTypeInstance())) { throw FilterParserExceptionImpl.createTYPE_EXPECTED_AT(EdmBoolean.getInstance(), node.getEdmType(), 1, curExpression);
@Override public boolean validate(final String value, final EdmLiteralKind literalKind, final EdmFacets facets) { return value == null ? facets == null || facets.isNullable() == null || facets.isNullable() : validateLiteral(value); }