org.faceless.pdf2.viewer2.feature

## Class TextSelection.RangeList

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractList<TextSelection.Range>
    - - org.faceless.pdf2.viewer2.feature.TextSelection.RangeList

- All Implemented Interfaces:
    Iterable<TextSelection.Range>, Collection<TextSelection.Range>, List<TextSelection.Range>
  Enclosing class:
    TextSelection

      public static class TextSelection.RangeList
      extends AbstractList<TextSelection.Range>

  A `RangeList` is a read-only list of `Range` objects. The range may cover more than one page.

- - ### Field Summary

    - ### Fields inherited from class java.util.AbstractList

      `modCount`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RangeList(List<? extends TextSelection.Range> list, Comparator<PageExtractor.Text> order)` Create a RangeList containing a list of `TextSelection.Range` objects
    `RangeList(TextSelection.Range range, Comparator<PageExtractor.Text> order)` Create a RangeList containing a single `TextSelection.Range`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TextSelection.Range` | `get(int index)`
    `float[]` | `getCorners(PDFPage page)` Get the Corners of the area marked by this highlight.
    `Set<PDFPage>` | `getPages()` Return the list of Pages included with this Range
    `AttributedString` | `getStyledText()` Return the text included in this RangeList
    `StringBuffer` | `getText()` Return the text included in this RangeList
    `boolean` | `isValid()` Return true if this list is not empty and every Range it contains is valid, false otherwise
    `int` | `size()`
    `String` | `toString()`

    - ### Methods inherited from class java.util.AbstractList

      `add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList`

    - ### Methods inherited from class java.util.AbstractCollection

      `addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.List

      `addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray`

    - ### Methods inherited from interface java.util.Collection

      `parallelStream, removeIf, stream`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

- - ### Constructor Detail

    - #### RangeList

          public RangeList(TextSelection.Range range,
                           Comparator<PageExtractor.Text> order)

      Create a RangeList containing a single `TextSelection.Range`

    - #### RangeList

          public RangeList(List<? extends TextSelection.Range> list,
                           Comparator<PageExtractor.Text> order)

      Create a RangeList containing a list of `TextSelection.Range` objects
      Parameters:
        `list` - the list of `TextSelection.Range` objects

  - ### Method Detail

    - #### get

          public TextSelection.Range get(int index)

      Specified by:
        `get` in interface `List<TextSelection.Range>`
      Specified by:
        `get` in class `AbstractList<TextSelection.Range>`

    - #### size

          public int size()

      Specified by:
        `size` in interface `Collection<TextSelection.Range>`
      Specified by:
        `size` in interface `List<TextSelection.Range>`
      Specified by:
        `size` in class `AbstractCollection<TextSelection.Range>`

    - #### isValid

          public boolean isValid()

      Return true if this list is not empty and every Range it contains is valid, false otherwise

    - #### getPages

          public Set<PDFPage> getPages()

      Return the list of Pages included with this Range
      Since:
        2.11.8

    - #### getCorners

          public float[] getCorners(PDFPage page)

      Get the Corners of the area marked by this highlight. These are in the same order as those returned by `PageExtractor.Text.getCorners()`
      Parameters:
        `page` - the PDFPage that we want the corners for.

    - #### getText

          public StringBuffer getText()

      Return the text included in this RangeList

    - #### getStyledText

          public AttributedString getStyledText()

      Return the text included in this RangeList

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `AbstractCollection<TextSelection.Range>`

Copyright © 2001-2015 Big Faceless Organization