wiki:IMM_COLLECTIONS_REFACTOR
Last modified 15 years ago Last modified on 05/13/10 18:32:56

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(ticket_group=immutable collections, format=table, col=summary|owner|status|type|component|priority|effort|importance|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

The goal of this task is to review/refactor the org.sophie2.base.commons.structure's classes - so called immutable collections. There are several reported problems and possible improvements in the classes:

  1. Quite complex constructing of ImmCollections - This is due inner implementation of tree structure::

solution: create several factory method for the specific collections - there can be hashing or non-hashing collection, also with or without iterator.

  1. There is no easy method for creating an immutable collection of another collection - Now, it mostly done by adding element by element in new collection::

solution: create method which by a given collection constructs an immutable collection. (investigate for faster creating in specific cases.

  1. Need of faster iterators - Interators in this moments are needed to be faster.

solution: investigate for way to improve iterators.

  1. Missing indexOf(...) method - There is need for such method, mainly by text usage.

solution: make apropriate method.

  1. Slow foreach

solution: investigate for way to improve performance of foreach.

  1. Bug: get(K) throws exception when K is missing

solution: make it returns null instead of exception.

Overview

(Provide a brief overview of the whole task in its first revision. Stick to the current revision of the task, but keep an eye to the whole task progress, and stay alert for possible smells.)

Task requirements

(List the necessary requirements that the task must fulfill.)

Task result

(List the end product of the task (for example "Source code", "Wiki page", etc.))

Implementation idea

(Provide some rough implementation idea(s).)

IMMUTABLE_TREE_R0

How to demo

(Provide instructions for demonstration of the task.)

Design

(Describe your design here.)

Implementation

(Describe and link the implementation results here (from the wiki or the repository).)

Testing

(Place the testing results here.)

Comments

(Write comments for this or later revisions here.)