Code example for LinkedList

Methods: getLast

0
		parentSegments.removeLast();
		return new TreePath(parentSegments.toArray());
	} 
 
	public Object getLastSegment() {
		return segments.getLast();
	} 
 
	public Object getFirstSegment() {
		return segments.getFirst();
	} 
 
	@Override 
	public String toString() {
		StringBuffer buffer = new StringBuffer();
		for (Object segment : segments) {
			buffer.append(segment).append("::");
		} 
		return buffer.toString();
	}