javax.swing.text.html

Class HTMLDocument.Iterator

  • Enclosing class:
    HTMLDocument

    public abstract static class HTMLDocument.Iterator
    extends Object
    An iterator to iterate over a particular type of tag. The iterator is not thread safe. If reliable access to the document is not already ensured by the context under which the iterator is being used, its use should be performed under the protection of Document.render.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      abstract AttributeSet getAttributes()
      Return the attributes for this tag.
      abstract int getEndOffset()
      Returns the end of the range for which the current occurrence of the tag is defined and has the same attributes.
      abstract int getStartOffset()
      Returns the start of the range for which the current occurrence of the tag is defined and has the same attributes.
      abstract HTML.Tag getTag()
      Type of tag this iterator represents.
      abstract boolean isValid()
      Indicates if the iterator is currently representing an occurrence of a tag.
      abstract void next()
      Move the iterator forward to the next occurrence of the tag it represents.

        

    • Constructor Detail

      • HTMLDocument.Iterator

        public HTMLDocument.Iterator()
    • Method Detail

      • getAttributes

        public abstract AttributeSet getAttributes()
        Return the attributes for this tag.
        Returns:
        the AttributeSet for this tag, or null if none can be found
      • getStartOffset

        public abstract int getStartOffset()
        Returns the start of the range for which the current occurrence of the tag is defined and has the same attributes.
        Returns:
        the start of the range, or -1 if it can't be found
      • getEndOffset

        public abstract int getEndOffset()
        Returns the end of the range for which the current occurrence of the tag is defined and has the same attributes.
        Returns:
        the end of the range
      • next

        public abstract void next()
        Move the iterator forward to the next occurrence of the tag it represents.
      • isValid

        public abstract boolean isValid()
        Indicates if the iterator is currently representing an occurrence of a tag. If false there are no more tags for this iterator.
        Returns:
        true if the iterator is currently representing an occurrence of a tag, otherwise returns false
      • getTag

        public abstract HTML.Tag getTag()
        Type of tag this iterator represents.

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 07/12/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/swing/text/html/HTMLDocument.Iterator.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, HTMLDocument.Iterator

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut