|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscala.AnyVal
akka.dispatch.sysmsg.EarliestFirstSystemMessageList
public class EarliestFirstSystemMessageList
INTERNAL API
Value class supporting list operations on system messages. The next
field of SystemMessage
is hidden, and can only accessed through the value classes LatestFirstSystemMessageList
and
EarliestFirstSystemMessageList
, 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.
This list type also encodes that the messages contained are in reverse order, i.e. the head of the list is the latest appended element.
Constructor Summary | |
---|---|
EarliestFirstSystemMessageList(SystemMessage head)
|
Method Summary | |
---|---|
SystemMessage |
head()
|
boolean |
isEmpty()
Indicates if the list is empty or not. |
boolean |
nonEmpty()
Indicates if the list has at least one element or not. |
LatestFirstSystemMessageList |
reverse()
Reverses the list. |
int |
size()
Indicates if the list is empty or not. |
EarliestFirstSystemMessageList |
tail()
Gives back the list containing all the elements except the first. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EarliestFirstSystemMessageList(SystemMessage head)
Method Detail |
---|
public SystemMessage head()
public final boolean isEmpty()
public final boolean nonEmpty()
public final int size()
public final EarliestFirstSystemMessageList tail()
*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.
public final LatestFirstSystemMessageList reverse()
The type of the returned list is of the opposite order: LatestFirstSystemMessageList
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |