public class TransactionListNIL extends TransactionList
EMPTY_LIST
Modifier | Constructor and Description |
---|---|
protected |
TransactionListNIL()
This class is a singleton, to access the only object use
TransactionList.EMPTY_LIST |
Modifier and Type | Method and Description |
---|---|
Transaction |
head() |
boolean |
isEmpty() |
int |
length() |
TransactionList |
tail() |
prepend
protected TransactionListNIL()
TransactionList.EMPTY_LIST
public Transaction head()
head
in class TransactionList
this
list, or
null
iff this list is emptypublic TransactionList tail()
tail
in class TransactionList
this
list, or null
iff this list is
emptypublic boolean isEmpty()
isEmpty
in class TransactionList
true
iff this
list is emptypublic int length()
length
in class TransactionList