Code example for LinkedList

Methods: getFirst

0
	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();
	} 
 
	protected IllegalArgumentException createCyclicPathException(
			Object segment) {
		return new IllegalArgumentException("Cyclic in path '" + this
				+ "' while adding segment '" + segment + "'");