Impl of linkedlist node in java