Gets the last element sibling of this element
@return the last sibling that is an element (aka the parent's last element child)
501574
public Element lastElementSibling() {
        List<Element> siblings = parent().childElementsList();
        return siblings.size() > 1 ? siblings.get(siblings.size() - 1) : null;
    }
518347
@Override
    public E last()
    {
        if (list.isEmpty())
        {
            throw new NoSuchElementException();
        }
        return list.get(list.size()-1);
    }
174418
int getLast()
  {

    int size = m_countNodes.size();

    return (size > 0) ? m_countNodes.elementAt(size - 1) : DTM.NULL;
  }
1368342
BaseRow removeLast() {
		Map.Entry<BaseRow, Collection<BaseRow>> last = treeMap.lastEntry();
		BaseRow lastElement = null;
		if (last != null) {
			Collection<BaseRow> list = last.getValue();
			lastElement = getLastElement(list);
			if (lastElement != null) {
				if (list.remove(lastElement)) {
					currentTopNum -= 1;
				}
				if (list.size() == 0) {
					treeMap.remove(last.getKey());
				}
			}
		}
		return lastElement;
	}
1071029
public Node previousSibling() {
        if (parentNode == null)
            return null; // root

        if (siblingIndex > 0)
            return parentNode.ensureChildNodes().get(siblingIndex-1);
        else
            return null;
    }
324042
public function last_tag_node()
	{
		$children_len = count($this->children);

		for($i=$children_len-1; $i >= 0; $i--)
			if($this->children[$i] instanceof Node_Container_Tag)
				return $this->children[$i];

		return null;
	}
836758
public Node getLastChild()
  {

    ElemTemplateElement lastChild = null;

    for (ElemTemplateElement node = m_firstChild; node != null;
            node = node.m_nextSibling)
    {
      lastChild = node;
    }

    return lastChild;
  }
1188225
private Object getPreviousElement() {
        Object element = null;
        while (currentIndex >= startIndex && element == null) {
            currentIndex--;
            element = getElement();
        }
        return element;
    }
130160
protected TagView getLastNormalTagView() {
        final int lastNormalTagIndex = isAppendMode ? getChildCount() - 2 : getChildCount() - 1;
        TagView lastNormalTagView = getTagAt(lastNormalTagIndex);
        return lastNormalTagView;
    }
1363518
def prev_sibling(self):
        
        if self.parent is None:
            return None

        # Can't use index(); we need to test by identity
        for i, child in enumerate(self.parent.children):
            if child is self:
                if i == 0:
                    return None
                return self.parent.children[i-1]
1162868
public Node firstChild() {

		if (currentNode == null)
			return null;

		Node node = getFirstChild(currentNode);

		if (node != null)
			currentNode = node;

		return node;
	}
921999
public LeftTupleSinkNode removeLast() {
        if ( this.lastNode == null ) {
            return null;
        }
        final LeftTupleSinkNode node = this.lastNode;
        this.lastNode = node.getPreviousLeftTupleSinkNode();
        node.setPreviousLeftTupleSinkNode( null );
        if ( this.lastNode != null ) {
            this.lastNode.setNextLeftTupleSinkNode( null );
        } else {
            this.firstNode = this.lastNode;
        }
        this.size--;
        return node;
    }
63072
def next_element
      element = next_sibling
      element = element.next_sibling until element.nil? or element.kind_of? Element 
      return element
    end
632672
public NoteAbstract getLastNote() {
		if (lastNote == null) {
			for (int i = super.size() - 1; i >= 0; i--) {
				if (super.elementAt(i) instanceof NoteAbstract) {
					lastNote = (NoteAbstract) super.elementAt(i);
					break;
				}
			}
		}
		return lastNote;
	}
55802
public boolean isLast()
    {
        if (_parent == null)
            return true;
        int last = _parent.size() - 1;
        assert(last >= 0);
        return (_parent.getChild(last) == this);
    }
952152
private String getParentContainerId(Element elem) {

        String attr = CmsContainerPageContainer.PROP_CONTAINER_MARKER;
        Element lastElem;
        do {
            String propValue = elem.getPropertyString(attr);
            if (!CmsStringUtil.isEmptyOrWhitespaceOnly(propValue)) {
                return propValue;
            }
            lastElem = elem;
            elem = elem.getParentElement();
        } while ((elem != null) && (elem != lastElem));
        return null;
    }
1308812
public EncodedElement getEnd() {
    EncodedElement temp = next;
    EncodedElement end = this;
    while(temp != null) {
      end = temp;
      temp = temp.next;
    }
    return end;
  }