Uploaded image for project: 'OpenTrafficSim'
  1. OpenTrafficSim
  2. OTS-137

Immutable collection classes

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Priority: Medium
    • Resolution: Unresolved
    • Labels:
      None

      Description

      For certain functions, such as the relations between a LinkType and a GTUType or a LaneType and a GTUType, immutable collection classes would be a big help. The java.util.Collections immutable collection classes throw an UnsopportedOperationException during runtime when the collections are mutated; of course an interface for collections that does not allow the classes to be changed is much better.

      The idea is to create ImmutableCollection, ImmutableSet, ImmutableList and ImmutableMap interfaces, and reference implementations for the most used collection classes.

        Attachments

          Activity

            People

            • Assignee:
              averbraeck Alexander Verbraeck
              Reporter:
              averbraeck Alexander Verbraeck
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                0m
                Logged:
                Time Not Required
                Not Specified