Inheriting two kinds of Lists into one Class
I want to know if its possible to implement an ArrayList and a LinkedList into a single class ?. What I exactly want to do is this :
* Perform addition and removals of elements from the List using a LinkedList.
* Perform traversals and searching of elements in the List using an ArrayList .
I know this is possible by composition . But it is likely that it could not be very efficient as I will have to maintain two separate Lists ( an ArrayList and a LinkedList ).Meaning if I add an element through the LinkedList , then I will have to update my ArrayList accordingly.So this destroys the Whole idea of writing a List implementation which Fast and Efficient . Is it possible to implement the class using extension .
Thank you for your Help.