Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.16 seconds.

  1. Re: What is the rationale behind `immutableCollection` family of methods, and the advantages of the particular pattern?

    That might be how you think it should work, but that's not how it works in reality: the unmodifiableXYZ() functions give you either a SortedSet (which implements Collection), a SortedMap (which...
  2. Re: What is the rationale behind `immutableCollection` family of methods, and the advantages of the particular pattern?

    Good point about the views guys, I hadn't really thought it through.

    I guess the "answer" is that the UnmodifiableDataStructure has to at least implement the Collection interface to be useful, so...
  3. Re: What is the rationale behind `immutableCollection` family of methods, and the advantages of the particular pattern?

    One benefit of the way Java does it is that it allows you to create unmodifiable views of your data structures, which is the whole point of the methods in the first place. If it returned some other...
Results 1 to 3 of 3