Get the last event.

@return Event                   The event.
@throws UndefinedEventException If there are no events.
337902
public function lastEvent(): Event
    {
        if ($count = count($this->calls)) {
            return $this->calls[$count - 1];
        }

        throw new UndefinedEventException(0);
    }
518347
@Override
    public E last()
    {
        if (list.isEmpty())
        {
            throw new NoSuchElementException();
        }
        return list.get(list.size()-1);
    }
102701
public Object getEventResult() {
		Object result = eventResultCache.get();
		if (result != null) {
			return result;
		}

		if (eventResultHandler != null) {
			result = eventResultHandler.get();
			if (result != null){
				if (!eventResultCache.compareAndSet(null, result)){
					result = eventResultCache.get();
				}
			}
		}
		return result;
	}
972661
public function lastCall(): Call
    {
        if ($this->callCount) {
            return $this->callVerifierFactory
                ->fromCall($this->calls[$this->callCount - 1]);
        }

        throw new UndefinedCallException(0);
    }
1211235
public function getEventManager()
    {
        if (null === $this->events) {
            $this->setEventManager($this->getServiceLocator()->get('EventManager'));
        }

        return $this->events;
    }
222091
public function last()
    {
        return (null === $this->getDraft()) ? $this->getData($this->count() - 1) : $this->getDraft()->last();
    }
1030940
public function lastCall(): Call
    {
        if ($count = count($this->calls)) {
            return $this->calls[$count - 1];
        }

        throw new UndefinedCallException(0);
    }
212378
public Date getLastIndexed() {
		Date lastIndexed = null;
		TableIndex tableIndex = getTableIndex();
		if (tableIndex != null) {
			lastIndexed = tableIndex.getLastIndexed();
		}
		return lastIndexed;
	}
1317226
function() {
    for (var i = 0, len = this.events.length; i < len; i++) {
      if (this.events[i].streamRevision > this.lastRevision) {
        this.lastRevision = this.events[i].streamRevision;
      }
    }

    return this.lastRevision;
  }
1293695
public int getEventCount()
    {
        int count = _events.size();
        if (_superEventSet != null)
            count += _superEventSet.getEventCount();
        return count;
    }
534751
public function getEvents()
    {
        if (! $this->events) {
            $services = $this->getServices();
            $events   = $services->get('Events');
            $this->setEvents($events);
        }

        return $this->events;
    }
1007568
public WeldEvent<Object> event() {
        checkIsRunning();
        if (event == null) {
            synchronized (this) {
                if (event == null) {
                    event = beanManager().event();
                }
            }
        }
        return event;
    }
269087
public function last()
    {
        $lastIndex = (count($this->source) - 1);
        if (isset($this->source[$lastIndex])) {
            return $this->source[$lastIndex];
        }

        return null;
    }
343871
public function getEventManager()
    {
        if (null === $this->events) {
            $this->setEventManager(
                new EventManager(
                    $this->getServiceManager()->get('SharedEventManager'), [get_class($this)]
                )
            );
        }

        return $this->events;
    }
609822
public function currentEvent()
    {
        if ($this->currentEvent) {
            return $this->currentEvent;
        }

        // The the current event
        $event = $this->eventManager()->entry();

        // Format the event
        if ($event) {
            $this->currentEvent = $this->eventFormatFull($event);
        }

        return $this->currentEvent;
    }
605740
@Override
  public T nextEvent() {
    if (producedEvents >= maxEvents) {
      return null;
    }
    T event = createNextEvent();
    producedEvents++;
    return event;
  }
894786
@SuppressWarnings("unchecked")
	public T last() {
		T ret;
		if (JcRelation.class.equals(type)) {
			ret = (T) new JcRelation(null, this, 
					new FunctionInstance(FUNCTION.Collection.LAST, 1));
		} else if (JcNode.class.equals(type)) {
			ret = (T) new JcNode(null, this, 
					new FunctionInstance(FUNCTION.Collection.LAST, 1));
		} else {
			ret = (T) new JcValue(null, this, 
					new FunctionInstance(FUNCTION.Collection.LAST, 1));
		}
		QueryRecorder.recordInvocationConditional(this, "last", ret);
		return ret;
	}