Removes and return the last object in the bag.
@return the last object in the bag, null if empty.
778091
public E removeLast () {
		if (size > 0) {
			E e = data[--size];
			data[size] = null;
			return e;
		}

		return null;
	}
1296498
public final T clear()
  {
    T hold;
    _lock.lock();
    try
    {
      hold = _val;
      _val = null;
    } finally {
      _lock.unlock();
    }
    return hold;
  }
1302433
private E unlinkLast() {
        // assert lock.isHeldByCurrentThread();
        Node<E> l = last;
        if (l == null)
            return null;
        Node<E> p = l.prev;
        E item = l.item;
        l.item = null;
        l.prev = l; // help GC
        last = p;
        if (p == null)
            first = null;
        else
            p.next = null;
        --count;
        notFull.signal();
        return item;
    }
525195
public synchronized TreeEntry<K, V> pollLastEntry() {
		final TreeEntry<K, V> entry = lastEntry();
		if (entry != null) {
			remove(entry.getKey());
		}
		return entry;
	}
1103989
def last(self):
        
        last_items = []
        for (k, v) in self.items():
            if isinstance(v, NdMapping):
                item = (k, v.clone((v.last_key, v.last)))
            elif isinstance(v, AdjointLayout):
                item = (k, v.last)
            else:
                item = (k, v)
            last_items.append(item)
        return self.clone(last_items)
223560
public static <T> T getLast(List<T> list) {
		if (isEmpty(list)) {
			return null;
		}

		return list.get(list.size() - 1);
	}
269909
public static <T> T getLast(List<T> collection)
    {
        return Iterate.isEmpty(collection) ? null : collection.get(collection.size() - 1);
    }
740966
@Override
    public E pollLast()
    {
        if (!list.isEmpty())
        {
            return list.remove(list.size()-1);
        }
        return null;
    }
1214525
public final Optional<T> last() {
        // Iterables#getLast was inlined here so we don't have to throw/catch a NSEE
        Iterator<T> iterator = this.iterator();
        if (!iterator.hasNext()) {
            return empty();
        }

        while (true) {
            T current = iterator.next();
            if (!iterator.hasNext()) {
                return Optional.of(current);
            }
        }
    }
157848
public static <E> E last(Iterable<E> iterable) {
        dbc.precondition(iterable != null, "cannot call last with a null iterable");
        return new LastElement<E>().apply(iterable.iterator());
    }
379304
public function last()
    {
        $arr = $this->val();
        $last = end($arr);

        return StdObjectWrapper::returnStdObject($last);
    }
1228582
public T removeLast()
   {
      T element = elementData[--size];
      elementData[size] = null;
      return element;
   }
301195
@SuppressWarnings("unchecked")
    public final T last() {
        if (this instanceof Callable) {
            return checkedCall((Callable<T>) this);
        }
        Iterator<T> it = iterator();
        if (!it.hasNext()) {
            throw new NoSuchElementException();
        }

        for (;;) {
            T t = it.next();
            if (!it.hasNext()) {
                return t;
            }
        }
    }
653022
public Node removeLast()
    {
        Node node = header.getPreviousNode();
        lastByte -= node.ba.last();
        return removeNode( node );
    }
471043
public T remove() {
        lock.lock();

        try {
            if(queue.isEmpty())
                return null;
            El<T> el=queue.poll();
            count-=el.size;
            not_full.signalAll();
            return el.el;
        }
        finally {
            lock.unlock();
        }
    }
928266
public int last() {
    assertNonEmpty();
    short lastKey = keys[size - 1];
    Container container = values[size - 1];
    return lastKey << 16 | container.last();
  }
528917
public function last()
    {
        if ($this->isEmpty()) {
            return null;
        }

        $lastItem = array_slice($this->container, -1, 1);

        return current($lastItem);
    }