Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-1045

Refactor read-only classes to use a common abstract class to reduce code

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-collections
    • Labels:
      None

      Description

      All of the "read-only" collection classes (such as ArrayAdapter, EnumList, ImmutableList) share the concept that "add", "insert", "remove", etc. all throw exceptions because they are unsupported in a read-only collection. It would reduce code and expose the common functionality if they were all implemented on top of a single abstract class that provides a uniform implementation of these unsupported methods.

      I propose to implement a ReadOnlySequence class that does this and refactor all other existing places (at least) with the common subclass.

        Attachments

          Activity

            People

            • Assignee:
              rwhitcomb Roger Lee Whitcomb
              Reporter:
              rwhitcomb Roger Lee Whitcomb
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: