commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] [Created] (COMPLEX-3) Make "RootsOfUnity" immutable
Date Sun, 08 Jan 2017 02:44:58 GMT
Gilles created COMPLEX-3:

             Summary: Make "RootsOfUnity" immutable
                 Key: COMPLEX-3
             Project: Commons Complex
          Issue Type: Improvement
            Reporter: Gilles
            Assignee: Gilles
            Priority: Minor

The computation could be performed in the constructor, allowing
all fields to be made "final".
Synchronized methods would become unnecessary to ensure thread-safety, and numerous checks
(to guard against a non-initialized instance) could be dropped.

Overall the code can be simplified at the cost of dropping the "clockwise" store (see current

An accessor method to get the each of the roots as a {{Complex}} should be provided, to replace
the current separate retrieval of its real and imaginary parts.

Also this class should not be {{Serializable}}.

This message was sent by Atlassian JIRA

View raw message