|
I have always been using the stock JDK collections in my code. Does the Apache Commons Collections framework run faster?
Started by smartfairy on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You're sort of missing the point, because Apache....
For a new project that needs something beyond JDK Collections, I can't understand why anyone would choose Commons Collections over the Google Collections Library.
Support generics.
|
|
Please suggest some elegant way to convert
arrays of arrays to collections of collections and vice versa in Java.
I suppose there's no convenience methods in the Java API, right?
public static <T> T[][] nestedCollectionsToNestedArrays( Collection...
Started by ivan_ivanovich_ivanoff on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
For Collection of Collections -> array?
No, but that's the reason for a different question: why the Collection of Collections -> array.
]); } } return ret; }
The other direction is much trickier .
|
|
I have a pretty simple question. While I am fairly new to Objective-C, I have gotten pretty comfortable with the language and the memory management model.
I understand ownership pretty well and the notion of explicit and implicit. I also understand that...
Answer Snippets (Read the full thread at stackoverflow):
From the Collections programming guide: http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Collections/Articles/Arrays.html
"And when you add an object to an Objective-C array, the object isn.
|
Ask your Facebook Friends
|
Recently I used a class that inherits from a collection instead of having the collection instantiated within the class, is this acceptable or does it create unseen problems further down the road? Examples below for the sake of clarity:
public class Cars...
Answer Snippets (Read the full thread at stackoverflow):
If it is only going to work as your own implementation of a... .
That depends on the final purpose of your class.
The problem with this is that your Cars class will still have the interface it inherits from List, which may allow operations you don't want .
|
|
I would like to be able to fusion an IEnumerable<IEnumerable<T>> into IEnumerable<T> (i.e. merge all individual collections into one). The Union operators only applies to two collections. Any idea?
Started by Joannes Vermorel on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Var lists = GetTheNestedCase(); return from list in lists from element .
It's great for breaking down collections of collections into a flat list.
It will turn one element into many (hence SelectMany).
|
|
The Java Collections Framework is like the C++ Standard Template Library: "a unified architecture for representing and manipulating collections (objects that group multiple elements into a single unit)."
http://java.sun.com/docs/books/tutorial/collections...
Started by saidimu on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
All of the core collections featured in the Java Collections Framework are already present in core Python what to check out collections....
Python.
As it turns out, the equivalent to the Java Collections Framework in Python is...
|
|
Is there a class that represents the concatenation of a collection with another collection? This class should be a Collection in itself, and should delegate all methods to the underlying (inner) collections - no extra memory should be allocated, nor any...
Started by ripper234 on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
After the concat call, you still have....
In other words, you have collections A and B, both of size N and M respectively.
For is a Java construct that allows you to put collections together without modifying the original collections.
|
|
What makes people to use Apache Commons Collections in new projects when Google Collections were finally released?
I simply don't understand it. Is it because people don't want to learn new stuff? Or it's because Apache Collections have something really...
Started by Roman on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Apache Commons Collections has been around members might be very familiar with....
Not that Google Collections isn't stable but it's 1.0.
Adding.
Some good reasons:
Reliance on other libraries that still use Apache Commons Collections.
|
|
I understand that collections are used as per requirement. But sometimes it turns out that we don't use some collections at all and may overuse some.
What are the most used collections in C# from the below list:
ArrayList Queue Stack BitArray Hashtable...
Started by n0vic3c0d3r on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
They are type-unsafe and when.
Actually, the only reason I see for their existence is due to amount of code that was built before .Net 2.0, that still uses those collections.
For the non-generic collections.
|
|
I wonder what is the most useful class in the Google collections framework ?
Started by Roman Kagan on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Oh, and not particularly collection-y, but Preconditions.checkNotNull is very handy ....
I use Lists.newArrayList frequently (usually as a static import) and Iterables is the closest that Java gets to LINQ.. .
In my experience, Iterables and Lists.
|