|
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 .
|
|
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...
|
Ask your Facebook Friends
|
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.
|
|
What's the difference between the children and childNodes collections of a node? And childElementCount and childNodes.length?
Started by JamesBrownIsDead on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Element.childNodes and element.childNodes.length : includes child elements, text nodes (including whitespace nodes between elements) and comments (plus potentially CDATASections, ProcessingInstructions... .
ChildNodes contains all nodes.
Children contains only elements.
|
|
Suppose I have a Collection of some kind that itself contains Collections; e.g., Dictionary(Of String, List(Of MyClass)). If I want to clear the Collection entirely, does it make any sense to clear every individual child collection before clearing the...
Started by Dan on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
To the 'child' collections, then Clear() on the 'parent' collection will result in the child collections of the child collections' elements implement IDisposable, as that implies they have some resource not handling any disposal....
|
|
Hi,
I was asked a question 'Implement toString in collections framework'.
I could not answer this, but I want to know how to do this?
Can I get any help?
Started by abhishek on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
I'm assuming....
In fact Example #2 mentions collections.
The same would apply for collections.
An article on implementing ToString in Java.
Java.util.AbstractCollection.
Just open up an implementation of the Collections framework, e.g.
|
|
I was just reading my news when I stumbled on Google-Collections project.
Does this work with GWT?
Started by jldupont on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The Google Collections.
Google Collections 1.0 has examine the build.xml file and try to build your own module and see what happens.
This suggests that it does work with GWT though not everything is supported .
|