开发者

Can anyone would provide me an example of reference-based linked list?

开发者 https://www.devze.com 2023-01-02 04:10 出处:网络
I\'m trying to create a reference based linked list anyone would be able to provide me an example 开发者_开发知识库of it??This isn\'t an answer as such but the following domain class should get you st

I'm trying to create a reference based linked list anyone would be able to provide me an example 开发者_开发知识库of it??


This isn't an answer as such but the following domain class should get you started:

public class Element{

private Object objectLink;

private Element nextElement;
private Element previousElement;

// Getter and setter methods here

}

What you need to add to this is a class that allows adding, removal and checking the state of the list (empty, size, etc.).

0

精彩评论

暂无评论...
验证码 换一张
取 消