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.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | isAttached
attachment flag |
| private long | linkTimeStamp
The attachment timestamp, which shows the time when the link was attached. |
| pack-priv Link | next
The pointer to the next link in the chain |
| pack-priv Link | prev
The pointer to the previous link in the chain |
| private final E | value
The Link payload/value |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| public long | getAttachmentTimeStamp()
Returns: the timestamp, that represents the time (in milliseconds) when the Link was attached to a
|
| public E | |
| public boolean | |
| public String |
| isAttached | back to summary |
|---|---|
| private boolean isAttached attachment flag | |
| linkTimeStamp | back to summary |
|---|---|
| private long linkTimeStamp The attachment timestamp, which shows the time when the link was attached. | |
| next | back to summary |
|---|---|
| pack-priv Link<E> next The pointer to the next link in the chain | |
| prev | back to summary |
|---|---|
| pack-priv Link<E> prev The pointer to the previous link in the chain | |
| value | back to summary |
|---|---|
| private final E value The Link payload/value | |
| Link | back to summary |
|---|---|
| public Link(final E value) Construct the Link holding given value object.
| |
| attach | back to summary |
|---|---|
| pack-priv void attach() Attaches the Link to a | |
| detach | back to summary |
|---|---|
| pack-priv void detach() Detaches the Link from a | |
| getAttachmentTimeStamp | back to summary |
|---|---|
| public long getAttachmentTimeStamp() | |
| getValue | back to summary |
|---|---|
public E getValue()
| |
| isAttached | back to summary |
|---|---|
public boolean isAttached()
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |