/** * Check that PDDocument is a valid file according to the format given during the object creation. * * @throws ValidationException */ public void validate() throws ValidationException { // force early class loading to check if people forgot to use --add-modules javax.xml.bind // on java 9 & 10, or to add jaxb-api on java 11 and later javax.xml.bind.DatatypeConverter.parseInt("0"); context.setConfig(config); Collection<String> processes = config.getProcessNames(); for (String name : processes) { ContextHelper.validateElement(context, name); } }
@Override public Serializable parseFromXML(String value) { return parseInt(value); }
@Override public Integer unmarshal(String value) throws Exception { if (value == null) return null; return parseInt(value); } }
@Override public Integer unmarshal(String value) { return (javax.xml.bind.DatatypeConverter.parseInt(value)); }
public IntValImpl(String value) { this(DatatypeConverter.parseInt(value)); } public IntValImpl(int value) {
public Integer unmarshal(String value) { return (javax.xml.bind.DatatypeConverter.parseInt(value)); }
public static Integer parseInteger(String value) { return DatatypeConverter.parseInt(value); }
public Integer unmarshal(String value) { return (javax.xml.bind.DatatypeConverter.parseInt(value)); }
static public int StringToIntegerPrimitive(String value) { try { return DatatypeConverter.parseInt(value); } catch(Exception e) { throw new IllegalArgumentException("Could not convert to int: "+value, e); } } static public Stream<Integer> StringToInteger(Stream<? extends String> values) {
public static Integer parseYear(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseInt(value) : null; }
public static Integer parseRooms(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseInt(value) : null; }
public static Integer parseImageAttributeType(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseInt(value) : null; }
public JExpression createConstant(Outline outline, XmlString lexical) { return JExpr.lit(DatatypeConverter.parseInt(lexical.value)); } };
public JExpression createConstant(Outline outline, XmlString lexical) { return JExpr.lit(DatatypeConverter.parseInt(lexical.value)); } };
public JExpression createConstant(Outline outline, XmlString lexical) { return JExpr.lit(DatatypeConverter.parseInt(lexical.value)); } };
@Override protected Number fromLexicalForm(String lexicalForm) throws InvalidLiteralException { try { int n = DatatypeConverter.parseInt( lexicalForm ); if( n < Byte.MIN_VALUE || n > Byte.MAX_VALUE ) throw new InvalidLiteralException( getName(), lexicalForm ); return Byte.valueOf( (byte) n ); } catch( NumberFormatException e ) { throw new InvalidLiteralException( getName(), lexicalForm ); } } }
@Override protected Number fromLexicalForm(String lexicalForm) throws InvalidLiteralException { try { int n = DatatypeConverter.parseInt( lexicalForm ); if( n < Byte.MIN_VALUE || n > Byte.MAX_VALUE ) throw new InvalidLiteralException( getName(), lexicalForm ); return Byte.valueOf( (byte) n ); } catch( NumberFormatException e ) { throw new InvalidLiteralException( getName(), lexicalForm ); } } }
@Override protected Number fromLexicalForm(String lexicalForm) throws InvalidLiteralException { try { int n = DatatypeConverter.parseInt( lexicalForm ); if( n < Short.MIN_VALUE || n > Short.MAX_VALUE ) throw new InvalidLiteralException( getName(), lexicalForm ); return Short.valueOf( (short) n ); } catch( NumberFormatException e ) { throw new InvalidLiteralException( getName(), lexicalForm ); } } }
@Override protected Number fromLexicalForm(String lexicalForm) throws InvalidLiteralException { try { int n = DatatypeConverter.parseInt( lexicalForm ); if( n < Short.MIN_VALUE || n > Short.MAX_VALUE ) throw new InvalidLiteralException( getName(), lexicalForm ); return Short.valueOf( (short) n ); } catch( NumberFormatException e ) { throw new InvalidLiteralException( getName(), lexicalForm ); } } }
@Override protected Number fromLexicalForm(String lexicalForm) throws InvalidLiteralException { try { final int i = DatatypeConverter.parseInt( lexicalForm ); if( i < 0 ) throw new InvalidLiteralException( getName(), lexicalForm ); if( i > MAX_VALUE ) throw new InvalidLiteralException( getName(), lexicalForm ); return i; } catch( NumberFormatException e ) { throw new InvalidLiteralException( getName(), lexicalForm ); } } }