I'm using a linked list and I want to synchronize it. There doesn't appear to be a method synchronizedLinkedList() only synchronizedList(). Sun recommend doing something like: List theList = Collections.synchronizedList(new LinkedList()); this would be fine but I use methods like theList.getFirst() and these are not avaiable in the basic List object. So basically I'm looking for a way of creating a synchronized LinkedList I was also wondering why this isn't available in the Collections class. Thanks
Even if you don't like it, you should just deal with it. One of the side effects of abstraction is a more simple interface, but greater flexiblilty. The performence penalty for some extra checking is neglegable (particularly compared to the penalty for synchronization).