“Collection Wrapper” pattern – is this common?
A different question of mine had to do with encapsulating member data structures inside classes. In order to understand this question better please read that question and look at the approach discussed.
“Collection Wrapper” pattern – is this common?
A different question of mine had to do with encapsulating member data structures inside classes. In order to understand this question better please read that question and look at the approach discussed.
Is immutability very worthwhile when there is no concurrency?
It seems that thread-safety is always/often mentioned as the main benefit of using immutable types and especially collections.
Is immutability very worthwhile when there is no concurrency?
It seems that thread-safety is always/often mentioned as the main benefit of using immutable types and especially collections.
Filtering a List
I will try to simplify my problem. Let say I have a collection (more specifically a List) with different types of elements, for explanation purpose let say we have objects “Person” with different age of birth and an ID. I will represent a person like this: {<id>,<year>}
Models, collections…and then what? Processes?
I’m a LAMP-stack dev who’s been more on the JavaScript side the last few years and really enjoying the Model + Collection approach to data entities that BackboneJS, etc. uses. It’s helped me organize my code in such a way that it is extremely portable, keeping all my properties and methods in the scope (model, collection, etc.) in which they apply.
Why does SortedDictionary not implement IReadOnlyDictionary?
The .NET type SortedDictionary<TKey, TValue>
does not implement the interface IReadOnlyDictionary<TKey, TValue>
, although Dictionary<TKey, TValue>
does.
Why does SortedDictionary not implement IReadOnlyDictionary?
The .NET type SortedDictionary<TKey, TValue>
does not implement the interface IReadOnlyDictionary<TKey, TValue>
, although Dictionary<TKey, TValue>
does.
Why does SortedDictionary not implement IReadOnlyDictionary?
The .NET type SortedDictionary<TKey, TValue>
does not implement the interface IReadOnlyDictionary<TKey, TValue>
, although Dictionary<TKey, TValue>
does.
Why does java collections not supply a function for the index of max value?
I have been using Collections.max(list)
for many projects, but I occasionally want to find the index of that maximum element. I feel silly writing a function to do this for myself in every program I write.