isLast method
Determine whether the element is the last element of the collection
Implementation
bool isLast(T element) {
if (isEmpty) return false;
return last == element;
}
Determine whether the element is the last element of the collection
bool isLast(T element) {
if (isEmpty) return false;
return last == element;
}