Top Description Inners Fields Constructors Methods
org.jboss.logmanager.formatters

pack-priv Class IndentingXmlWriter

extends Object
implements XMLStreamWriter, XMLStreamConstants
Class Inheritance
All Implemented Interfaces
javax.xml.stream.XMLStreamConstants, javax.xml.stream.XMLStreamWriter
Imports
java.util.Iterator, .NoSuchElementException, javax.xml.namespace.NamespaceContext, javax.xml.stream.XMLStreamConstants, .XMLStreamException, .XMLStreamWriter

An XML stream writer which pretty prints the XML.
Author
James R. Perkins

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final XMLStreamWriter
private boolean
private int
private static final String
private int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements javax.xml.stream.XMLStreamWriter.close.

Close this writer and free any resources associated with the writer.

public void
flush()

Implements javax.xml.stream.XMLStreamWriter.flush.

Write any cached data to the underlying output mechanism.

public NamespaceContext
getNamespaceContext()

Implements javax.xml.stream.XMLStreamWriter.getNamespaceContext.

Returns the current namespace context.

public String
getPrefix(final String
the uri the prefix is bound to
uri
)

Implements javax.xml.stream.XMLStreamWriter.getPrefix.

Gets the prefix the uri is bound to.

public Object
getProperty(final String
The name of the property, may not be null
name
)

Implements javax.xml.stream.XMLStreamWriter.getProperty.

Get the value of a feature/property from the underlying implementation

private void
private void
public void
setDefaultNamespace(final String
the uri to bind to the default namespace, may be null
uri
)

Implements javax.xml.stream.XMLStreamWriter.setDefaultNamespace.

Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair.

public void
setNamespaceContext(final NamespaceContext
the namespace context to use for this writer, may not be null
context
)

Implements javax.xml.stream.XMLStreamWriter.setNamespaceContext.

Sets the current namespace context for prefix and uri bindings.

public void
setPrefix(final String
the prefix to bind to the uri, may not be null
prefix
,
final String
the uri to bind to the prefix, may be null
uri
)

Implements javax.xml.stream.XMLStreamWriter.setPrefix.

Sets the prefix the uri is bound to.

public void
writeAttribute(final String
the local name of the attribute
localName
,
final String
the value of the attribute
value
)

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream without a prefix.

public void
writeAttribute(final String
the prefix for this attribute
prefix
,
final String
the uri of the prefix for this attribute
namespaceURI
,
final String
the local name of the attribute
localName
,
final String
the value of the attribute
value
)

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream

public void
writeAttribute(final String
the uri of the prefix for this attribute
namespaceURI
,
final String
the local name of the attribute
localName
,
final String
the value of the attribute
value
)

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream

public void
writeCData(final String
the data contained in the CData Section, may not be null
data
)

Implements javax.xml.stream.XMLStreamWriter.writeCData.

Writes a CData section

public void
writeCharacters(final String
the value to write
text
)

Implements javax.xml.stream.XMLStreamWriter.writeCharacters.

Write text to the output

public void
writeCharacters(final char[]
the value to write
text
,
final int
the starting position in the array
start
,
final int
the number of characters to write
len
)

Implements javax.xml.stream.XMLStreamWriter.writeCharacters.

Write text to the output

public void
writeComment(final String
the data contained in the comment, may be null
data
)

Implements javax.xml.stream.XMLStreamWriter.writeComment.

Writes an xml comment with the data enclosed

public void
writeDefaultNamespace(final String
the uri to bind the default namespace to
namespaceURI
)

Implements javax.xml.stream.XMLStreamWriter.writeDefaultNamespace.

Writes the default namespace to the stream

public void
writeDTD(final String
the DTD to be written
dtd
)

Implements javax.xml.stream.XMLStreamWriter.writeDTD.

Write a DTD section.

public void
writeEmptyElement(final String
the uri to bind the tag to, may not be null
namespaceURI
,
final String
local name of the tag, may not be null
localName
)

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

public void
writeEmptyElement(final String
the prefix of the tag, may not be null
prefix
,
final String
local name of the tag, may not be null
localName
,
final String
the uri to bind the tag to, may not be null
namespaceURI
)

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

public void
writeEmptyElement(final String
local name of the tag, may not be null
localName
)

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

public void
writeEndDocument()

Implements javax.xml.stream.XMLStreamWriter.writeEndDocument.

Closes any start tags and writes corresponding end tags.

public void
writeEndElement()

Implements javax.xml.stream.XMLStreamWriter.writeEndElement.

Writes an end tag to the output relying on the internal state of the writer to determine the prefix and local name of the event.

public void
writeEntityRef(final String
the name of the entity
name
)

Implements javax.xml.stream.XMLStreamWriter.writeEntityRef.

Writes an entity reference

public void
writeNamespace(final String
the prefix to bind this namespace to
prefix
,
final String
the uri to bind the prefix to
namespaceURI
)

Implements javax.xml.stream.XMLStreamWriter.writeNamespace.

Writes a namespace to the output stream If the prefix argument to this method is the empty string, "xmlns", or null this method will delegate to writeDefaultNamespace

public void
writeProcessingInstruction(final String
the target of the processing instruction, may not be null
target
)

Implements javax.xml.stream.XMLStreamWriter.writeProcessingInstruction.

Writes a processing instruction

public void
writeProcessingInstruction(final String
the target of the processing instruction, may not be null
target
,
final String
the data contained in the processing instruction, may not be null
data
)

Implements javax.xml.stream.XMLStreamWriter.writeProcessingInstruction.

Writes a processing instruction

public void
public void
writeStartDocument(final String
version of the xml document
version
)

Implements javax.xml.stream.XMLStreamWriter.writeStartDocument.

Write the XML Declaration.

public void
writeStartDocument(final String
encoding of the xml declaration
encoding
,
final String
version of the xml document
version
)

Implements javax.xml.stream.XMLStreamWriter.writeStartDocument.

Write the XML Declaration.

public void
writeStartElement(final String
local name of the tag, may not be null
localName
)

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output.

public void
writeStartElement(final String
the namespaceURI of the prefix to use, may not be null
namespaceURI
,
final String
local name of the tag, may not be null
localName
)

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output

public void
writeStartElement(final String
the prefix of the tag, may not be null
prefix
,
final String
local name of the tag, may not be null
localName
,
final String
the uri to bind the prefix to, may not be null
namespaceURI
)

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final XMLStreamWriter delegate
indentEndback to summary
private boolean indentEnd
indexback to summary
private int index
SPACESback to summary
private static final String SPACES
stateback to summary
private int state

Constructor Detail

IndentingXmlWriterback to summary
pack-priv IndentingXmlWriter(final XMLStreamWriter delegate)

Method Detail

closeback to summary
public void close() throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.close.

Doc from javax.xml.stream.XMLStreamWriter.close.

Close this writer and free any resources associated with the writer. This must not close the underlying output stream.

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
flushback to summary
public void flush() throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.flush.

Doc from javax.xml.stream.XMLStreamWriter.flush.

Write any cached data to the underlying output mechanism.

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
getNamespaceContextback to summary
public NamespaceContext getNamespaceContext()

Implements javax.xml.stream.XMLStreamWriter.getNamespaceContext.

Doc from javax.xml.stream.XMLStreamWriter.getNamespaceContext.

Returns the current namespace context.

Returns:NamespaceContext

the current NamespaceContext

Annotations
@Override
getPrefixback to summary
public String getPrefix(final String uri) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.getPrefix.

Doc from javax.xml.stream.XMLStreamWriter.getPrefix.

Gets the prefix the uri is bound to.

Parameters
uri:String

the uri the prefix is bound to

Returns:String

the prefix or null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
getPropertyback to summary
public Object getProperty(final String name) throws IllegalArgumentException

Implements javax.xml.stream.XMLStreamWriter.getProperty.

Doc from javax.xml.stream.XMLStreamWriter.getProperty.

Get the value of a feature/property from the underlying implementation

Parameters
name:String

The name of the property, may not be null

Returns:Object

The value of the property

Annotations
@Override
Exceptions
IllegalArgumentException:
if the property is not supported
indentback to summary
private void indent() throws XMLStreamException
newlineback to summary
private void newline() throws XMLStreamException
setDefaultNamespaceback to summary
public void setDefaultNamespace(final String uri) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.setDefaultNamespace.

Doc from javax.xml.stream.XMLStreamWriter.setDefaultNamespace.

Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair. If this method is called before a START_ELEMENT has been written the uri is bound in the root scope.

Parameters
uri:String

the uri to bind to the default namespace, may be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
setNamespaceContextback to summary
public void setNamespaceContext(final NamespaceContext context) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.setNamespaceContext.

Doc from javax.xml.stream.XMLStreamWriter.setNamespaceContext.

Sets the current namespace context for prefix and uri bindings. This context becomes the root namespace context for writing and will replace the current root namespace context. Subsequent calls to setPrefix and setDefaultNamespace will bind namespaces using the context passed to the method as the root context for resolving namespaces. This method may only be called once at the start of the document. It does not cause the namespaces to be declared. If a namespace URI to prefix mapping is found in the namespace context it is treated as declared and the prefix may be used by the StreamWriter.

Parameters
context:NamespaceContext

the namespace context to use for this writer, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
setPrefixback to summary
public void setPrefix(final String prefix, final String uri) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.setPrefix.

Doc from javax.xml.stream.XMLStreamWriter.setPrefix.

Sets the prefix the uri is bound to. This prefix is bound in the scope of the current START_ELEMENT / END_ELEMENT pair. If this method is called before a START_ELEMENT has been written the prefix is bound in the root scope.

Parameters
prefix:String

the prefix to bind to the uri, may not be null

uri:String

the uri to bind to the prefix, may be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeAttributeback to summary
public void writeAttribute(final String localName, final String value) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Doc from javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream without a prefix.

Parameters
localName:String

the local name of the attribute

value:String

the value of the attribute

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeAttributeback to summary
public void writeAttribute(final String prefix, final String namespaceURI, final String localName, final String value) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Doc from javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream

Parameters
prefix:String

the prefix for this attribute

namespaceURI:String

the uri of the prefix for this attribute

localName:String

the local name of the attribute

value:String

the value of the attribute

Annotations
@Override
Exceptions
XMLStreamException:
if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true
writeAttributeback to summary
public void writeAttribute(final String namespaceURI, final String localName, final String value) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Doc from javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream

Parameters
namespaceURI:String

the uri of the prefix for this attribute

localName:String

the local name of the attribute

value:String

the value of the attribute

Annotations
@Override
Exceptions
XMLStreamException:
if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true
writeCDataback to summary
public void writeCData(final String data) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeCData.

Doc from javax.xml.stream.XMLStreamWriter.writeCData.

Writes a CData section

Parameters
data:String

the data contained in the CData Section, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeCharactersback to summary
public void writeCharacters(final String text) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeCharacters.

Doc from javax.xml.stream.XMLStreamWriter.writeCharacters.

Write text to the output

Parameters
text:String

the value to write

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeCharactersback to summary
public void writeCharacters(final char[] text, final int start, final int len) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeCharacters.

Doc from javax.xml.stream.XMLStreamWriter.writeCharacters.

Write text to the output

Parameters
text:char[]

the value to write

start:int

the starting position in the array

len:int

the number of characters to write

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeCommentback to summary
public void writeComment(final String data) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeComment.

Doc from javax.xml.stream.XMLStreamWriter.writeComment.

Writes an xml comment with the data enclosed

Parameters
data:String

the data contained in the comment, may be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeDefaultNamespaceback to summary
public void writeDefaultNamespace(final String namespaceURI) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeDefaultNamespace.

Doc from javax.xml.stream.XMLStreamWriter.writeDefaultNamespace.

Writes the default namespace to the stream

Parameters
namespaceURI:String

the uri to bind the default namespace to

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeDTDback to summary
public void writeDTD(final String dtd) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeDTD.

Doc from javax.xml.stream.XMLStreamWriter.writeDTD.

Write a DTD section. This string represents the entire doctypedecl production from the XML 1.0 specification.

Parameters
dtd:String

the DTD to be written

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeEmptyElementback to summary
public void writeEmptyElement(final String namespaceURI, final String localName) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Doc from javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

Parameters
namespaceURI:String

the uri to bind the tag to, may not be null

localName:String

local name of the tag, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true
writeEmptyElementback to summary
public void writeEmptyElement(final String prefix, final String localName, final String namespaceURI) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Doc from javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

Parameters
prefix:String

the prefix of the tag, may not be null

localName:String

local name of the tag, may not be null

namespaceURI:String

the uri to bind the tag to, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeEmptyElementback to summary
public void writeEmptyElement(final String localName) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Doc from javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

Parameters
localName:String

local name of the tag, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeEndDocumentback to summary
public void writeEndDocument() throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeEndDocument.

Doc from javax.xml.stream.XMLStreamWriter.writeEndDocument.

Closes any start tags and writes corresponding end tags.

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeEndElementback to summary
public void writeEndElement() throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeEndElement.

Doc from javax.xml.stream.XMLStreamWriter.writeEndElement.

Writes an end tag to the output relying on the internal state of the writer to determine the prefix and local name of the event.

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeEntityRefback to summary
public void writeEntityRef(final String name) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeEntityRef.

Doc from javax.xml.stream.XMLStreamWriter.writeEntityRef.

Writes an entity reference

Parameters
name:String

the name of the entity

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeNamespaceback to summary
public void writeNamespace(final String prefix, final String namespaceURI) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeNamespace.

Doc from javax.xml.stream.XMLStreamWriter.writeNamespace.

Writes a namespace to the output stream If the prefix argument to this method is the empty string, "xmlns", or null this method will delegate to writeDefaultNamespace

Parameters
prefix:String

the prefix to bind this namespace to

namespaceURI:String

the uri to bind the prefix to

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeProcessingInstructionback to summary
public void writeProcessingInstruction(final String target) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeProcessingInstruction.

Doc from javax.xml.stream.XMLStreamWriter.writeProcessingInstruction.

Writes a processing instruction

Parameters
target:String

the target of the processing instruction, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeProcessingInstructionback to summary
public void writeProcessingInstruction(final String target, final String data) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeProcessingInstruction.

Doc from javax.xml.stream.XMLStreamWriter.writeProcessingInstruction.

Writes a processing instruction

Parameters
target:String

the target of the processing instruction, may not be null

data:String

the data contained in the processing instruction, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeStartDocumentback to summary
public void writeStartDocument() throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeStartDocument.

Doc from javax.xml.stream.XMLStreamWriter.writeStartDocument.

Write the XML Declaration. Defaults the XML version to 1.0, and the encoding to utf-8

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeStartDocumentback to summary
public void writeStartDocument(final String version) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeStartDocument.

Doc from javax.xml.stream.XMLStreamWriter.writeStartDocument.

Write the XML Declaration. Defaults the XML version to 1.0

Parameters
version:String

version of the xml document

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeStartDocumentback to summary
public void writeStartDocument(final String encoding, final String version) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeStartDocument.

Doc from javax.xml.stream.XMLStreamWriter.writeStartDocument.

Write the XML Declaration. Note that the encoding parameter does not set the actual encoding of the underlying output. That must be set when the instance of the XMLStreamWriter is created using the XMLOutputFactory

Parameters
encoding:String

encoding of the xml declaration

version:String

version of the xml document

Annotations
@Override
Exceptions
XMLStreamException:
If given encoding does not match encoding of the underlying stream
writeStartElementback to summary
public void writeStartElement(final String localName) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Doc from javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output. All writeStartElement methods open a new scope in the internal namespace context. Writing the corresponding EndElement causes the scope to be closed.

Parameters
localName:String

local name of the tag, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeStartElementback to summary
public void writeStartElement(final String namespaceURI, final String localName) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Doc from javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output

Parameters
namespaceURI:String

the namespaceURI of the prefix to use, may not be null

localName:String

local name of the tag, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true
writeStartElementback to summary
public void writeStartElement(final String prefix, final String localName, final String namespaceURI) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Doc from javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output

Parameters
prefix:String

the prefix of the tag, may not be null

localName:String

local name of the tag, may not be null

namespaceURI:String

the uri to bind the prefix to, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
org.jboss.logmanager.formatters back to summary

private Class IndentingXmlWriter.SplitIterator

extends Object
implements Iterator<String>
Class Inheritance
  • java.lang.Object
  • org.jboss.logmanager.formatters.IndentingXmlWriter.SplitIterator
All Implemented Interfaces
java.util.Iterator

Field Summary

Modifier and TypeField and Description
private final char
private int
private final String

Constructor Summary

AccessConstructor and Description
private
SplitIterator(final String value, final char delimiter)

Method Summary

Modifier and TypeMethod and Description
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public String
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delimiterback to summary
private final char delimiter
indexback to summary
private int index
valueback to summary
private final String value

Constructor Detail

SplitIteratorback to summary
private SplitIterator(final String value, final char delimiter)

Method Detail

hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
nextback to summary
public String next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:String

the next element in the iteration

Annotations
@Override
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override