This is an old school linked list. The method names are pretty messed up, it seems. Especially the delete
methods. This is more for a learning experience than actual use.
Not so old school anymore. I was told to implement a java.util.List<E> in Java with JUnit tests. Because this is a
singly linked list, I did not implement the listIterator
methods. I also didn't implement the subList
method as it
requires implementing another List<E> interface that satisfies its requirements.
Note: These 3 methods are not optional according to the Java documentation. I'm doing this for academic reasons as well as the fact that I love doing projects like this. This is certainly not a complete implementation of the interface.
I was able to save the old school code and JUnit tests. Feel free to check those out too.
Before Java, linked lists were pretty bare bones. This only has one isEmpty()
convenience method and two insert and remove methods.