Java implementation of various linked list types