E
- public final class Link<E> extends Object
Chain
is built.
It is possible to attach or detach a Link from a Chain
. When
the Link is attached it contains a pointers to the previous and
the next Links in the Chain
, otherwise, if the Link
is detached - the pointers values are null.
If a Link is attached - it can only be attached to one Chain
.Constructor and Description |
---|
Link(E value)
Construct the Link holding given value object.
|
Modifier and Type | Method and Description |
---|---|
long |
getAttachmentTimeStamp() |
E |
getValue() |
boolean |
isAttached() |
String |
toString() |
public Link(E value)
value
- an object the Link represents.public long getAttachmentTimeStamp()
Chain
, or -1 if the
Link is not currently attached to a Chain
.public boolean isAttached()
Chain
or false otherwise.Copyright © 2023 Oracle Corporation. All rights reserved.