--- old/src/java.xml/share/classes/javax/xml/stream/events/XMLEvent.java 2020-08-24 17:28:58.094378889 +0000 +++ new/src/java.xml/share/classes/javax/xml/stream/events/XMLEvent.java 2020-08-24 17:28:57.809364349 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,6 +51,7 @@ /** * Returns an integer code for this event. + * @return the event type * @see #START_ELEMENT * @see #END_ELEMENT * @see #CHARACTERS @@ -68,24 +69,28 @@ * Return the location of this event. The Location * returned from this method is non-volatile and * will retain its information. + * @return the location of the event * @see javax.xml.stream.Location */ javax.xml.stream.Location getLocation(); /** * A utility function to check if this event is a StartElement. + * @return true if the event is {@code StartElement}, false otherwise * @see StartElement */ public boolean isStartElement(); /** * A utility function to check if this event is an Attribute. + * @return true if the event is {@code Attribute}, false otherwise * @see Attribute */ public boolean isAttribute(); /** * A utility function to check if this event is a Namespace. + * @return true if the event is {@code Namespace}, false otherwise * @see Namespace */ public boolean isNamespace(); @@ -93,36 +98,42 @@ /** * A utility function to check if this event is a EndElement. + * @return true if the event is {@code EndElement}, false otherwise * @see EndElement */ public boolean isEndElement(); /** * A utility function to check if this event is an EntityReference. + * @return true if the event is {@code EntityReference}, false otherwise * @see EntityReference */ public boolean isEntityReference(); /** * A utility function to check if this event is a ProcessingInstruction. + * @return true if the event is {@code ProcessingInstruction}, false otherwise * @see ProcessingInstruction */ public boolean isProcessingInstruction(); /** * A utility function to check if this event is Characters. + * @return true if the event is {@code Characters}, false otherwise * @see Characters */ public boolean isCharacters(); /** * A utility function to check if this event is a StartDocument. + * @return true if the event is {@code StartDocument}, false otherwise * @see StartDocument */ public boolean isStartDocument(); /** * A utility function to check if this event is an EndDocument. + * @return true if the event is {@code EndDocument}, false otherwise * @see EndDocument */ public boolean isEndDocument(); @@ -130,18 +141,21 @@ /** * Returns this event as a start element event, may result in * a class cast exception if this event is not a start element. + * @return a {@code StartElement} event */ public StartElement asStartElement(); /** * Returns this event as an end element event, may result in * a class cast exception if this event is not a end element. + * @return a {@code EndElement} event */ public EndElement asEndElement(); /** * Returns this event as Characters, may result in * a class cast exception if this event is not Characters. + * @return a {@code Characters} event */ public Characters asCharacters(); @@ -150,6 +164,7 @@ * optional type information about the associated event. * It is optional and will return null if no information * is available. + * @return the type of the event, null if not available */ public QName getSchemaType();