You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Roger Whitcomb (JIRA)" <ji...@apache.org> on 2019/08/12 22:46:00 UTC
[jira] [Updated] (PIVOT-1045) Refactor read-only classes to use a
common abstract class to reduce code
[ https://issues.apache.org/jira/browse/PIVOT-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roger Whitcomb updated PIVOT-1045:
----------------------------------
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.
was:
All of the "read-only" collection classes (such as ArrayAdapter, EnumList, ImmutableList) share the concept that "add", "insert", "remove", etc. all throw an exception 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.
> Refactor read-only classes to use a common abstract class to reduce code
> ------------------------------------------------------------------------
>
> Key: PIVOT-1045
> URL: https://issues.apache.org/jira/browse/PIVOT-1045
> Project: Pivot
> Issue Type: Improvement
> Components: core-collections
> Reporter: Roger Whitcomb
> Assignee: Roger Whitcomb
> Priority: Minor
>
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)