Code example for LinkedList

Methods: size, toArray

0
		return 0; 
	} 
 
	@Override 
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeParcelableArray(segments.toArray(new RouteSegment[segments.size()]), flags);
	} 
 
	public static final Parcelable.Creator<Route> CREATOR = new Parcelable.Creator<Route>() {
		public Route createFromParcel(Parcel in) { 
			return new Route(in); 
		} 
 
		public Route[] newArray(int size) { 
			return new Route[size]; 
		} 
	}; 
	 
}