Java's typed/generic collections suck are ok, see below:
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class TokenTest {
public static void main(String[] args) {
Map<String, List<String[]>> tokenMap = new HashMap<String, List<String[]>>();
List tokenList = tokenMap.get("foo");
for (String[] tokenTerms : tokenList){
System.out.println(tokenTerms);
}
}
}
Then:
$>javac TokenTest.java
TokenTest.java:10: incompatible types
found : java.lang.Object
required: java.lang.String[]
for (String[] tokenTerms : tokenList){
^
1 error
Am I doing something wrong or is Java's typing stupid? Also note that Java didn't understand that ArrayList is a subtype of List when I tried to create a new HashMap<String, ArrayList<String[]>>();.
Update: Jürgen pointed out in a comment that List tokenList should have been List<String[]> tokenList. Problem solved. Thanks!
ongoing · Atom 1.0. Still not an official release, but pretty close. I'll probably get to it only when it has an RFC number.
Here's the current spec, and here's a comparison between RSS 2.0 and Atom. See atomenabled.org (and atompub.org) for more.
new⇒I hate PHP
Elliot Anderson,
Dude!! You theman! The reverse replacement forarray_u...
Alex Ndungu: Oct 11, 1:35am