Class LatestFirstSystemMessageList
- java.lang.Object
-
- scala.AnyVal
-
- akka.dispatch.sysmsg.LatestFirstSystemMessageList
-
public class LatestFirstSystemMessageList extends scala.AnyVal
INTERNAL APIValue class supporting list operations on system messages. The
next
field ofSystemMessage
is hidden, and can only accessed through the value classesLatestFirstSystemMessageList
andEarliestFirstSystemMessageList
, abstracting over the fact that system messages are the list nodes themselves. If used properly, this stays a compile time construct without any allocation overhead.This list is mutable.
The type of the list also encodes that the messages contained are in reverse order, i.e. the head of the list is the latest appended element.
-
-
Constructor Summary
Constructors Constructor Description LatestFirstSystemMessageList(SystemMessage head)
-
Method Summary
-
-
-
Constructor Detail
-
LatestFirstSystemMessageList
public LatestFirstSystemMessageList(SystemMessage head)
-
-
Method Detail
-
isEmpty$extension
public static final boolean isEmpty$extension(LatestFirstSystemMessageList $this)
-
nonEmpty$extension
public static final boolean nonEmpty$extension(LatestFirstSystemMessageList $this)
-
size$extension
public static final int size$extension(LatestFirstSystemMessageList $this)
-
tail$extension
public static final LatestFirstSystemMessageList tail$extension(LatestFirstSystemMessageList $this)
-
reverse$extension
public static final EarliestFirstSystemMessageList reverse$extension(LatestFirstSystemMessageList $this)
-
$colon$colon$extension
public static final LatestFirstSystemMessageList $colon$colon$extension(LatestFirstSystemMessageList $this, SystemMessage msg)
-
hashCode$extension
public static final int hashCode$extension(LatestFirstSystemMessageList $this)
-
equals$extension
public static final boolean equals$extension(LatestFirstSystemMessageList $this, java.lang.Object x$1)
-
head
public SystemMessage head()
-
isEmpty
public final boolean isEmpty()
Indicates if the list is empty or not. This operation has constant cost.
-
nonEmpty
public final boolean nonEmpty()
Indicates if the list has at least one element or not. This operation has constant cost.
-
size
public final int size()
Indicates if the list is empty or not. This operation has constant cost.
-
tail
public final LatestFirstSystemMessageList tail()
Gives back the list containing all the elements except the first. This operation has constant cost.*Warning:* as the underlying list nodes (the
SystemMessage
instances) are mutable, care should be taken when passing the tail to other methods.SystemMessage.unlink()
should be called on the head if one wants to detach the tail permanently.
-
reverse
public final EarliestFirstSystemMessageList reverse()
Reverses the list. This operation mutates the underlying list. The cost of the call to reverse is linear in the number of elements.The type of the returned list is of the opposite order:
EarliestFirstSystemMessageList
-
$colon$colon
public final LatestFirstSystemMessageList $colon$colon(SystemMessage msg)
Attaches a message to the current head of the list. This operation has constant cost.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Overrides:
equals
in classjava.lang.Object
-
-