(click images for a larger view)
Home » Archives for 03/08/13
Ferrari LaFerrari
V12 + Hy-KERS / 6.262 cc / 963 PS (800 + 163) / V12: 516 ft/lb (700 Nm) @ 6.750, System: >664 ft/lb (900 Nm) / 0 - 62 mph (100 km/h): 3,0 s / 0 - 124 mph (200 km/h): 7,0 s / 0 - 186 mph (300 km/h): 15,0 s / Vmax: 217 mph (350 km/h)
(click images for a larger view)
![](https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_tzLsOyRtjG0xWSwZmm7B1gD9DClliJ2uPOqADjQQfMqjR4Gso-TTi6QH18aonZLPqoURHmNEqb_Em1udMxbofurmQfqyug9ovYpNmHzKdGNqsSB3bFkMzwwg=s0-d)
![](https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_vcERKcmUwTxT3d-_GgdpGkjoi7qJOUwu-ABBbTHNO_qzF_66kBLLesRmoTacaX3yGY2Y6Ojt587NcvQwReT5bUZP59tCnio6wkfXgeN05jgjXSJplo86LA=s0-d)
![](https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_t672znXXFPV3Nbyhd0oNzf27bTODbr5LO2oG7Tvw1EXi1c9GlZnPL5Kek7_rQMqR0Bynj7e9dZUmz__lTCBdpwDHTjyODHrapCLgPftGXjfoAiA3YlIA=s0-d)
![](https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_vcP2Rdj_9ugn-1YTwOXQqa-1lu7VF5lrU-SyCYpBUxVpHCfFCr8kHoBwOb2jy3EHi6w8WM5ZZ7DSSPKOuYyXj-v98yEB8JeJYbDLO8YVAVwciFz7adjiFPew=s0-d)
![](https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_tjZugVI5LNx_rxdPrC8Ck3DgaTs6bnspDZBRpeKtoDhipvuu5cOn1xs8JSGq-qRRR1OmTCxUh7tEKWM06PTvvIUs-sbO6whFsWJgg2wCXV1bdITTnDWXa5YA=s0-d)
![](https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_uTDoBAnrzzTxhJ7KnUiUXsznc7OtXAdSJ0daDc-ShvDNRYjPaAQpHvvyBEjv34ahCZwGYZ7Jpfup4VzN5Ab5tylmjefYK9o5ZK1ZV2AHeCGaaKPSDnub5-=s0-d)
![](https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_tI5n0jzcepjjFeTezDzSA8oROh_DrWgOPiMiJbiilLkquMptfPAcObSzb4SWgFL0fL41szIlLe4bXxbIDWuDmZZsv5UUbrEfBfh4Ch6UzWV28ToGQJzzM=s0-d)
(click images for a larger view)
What is Iterable?
In the exercise "Draw hollow Polygon on Map, using addHole() method", object of ArrayList<LatLng> is passed to addHole() as Iterable<latlng>. And...what is Iterable?
Described in Android document: Iterable<T>: Instances of classes that implement this interface can be used with the enhanced for loop. In Java 6 document (Android now support JDK6), this interface allows an object to be the target of the "foreach" statement.
Here is example to use Iterable in for loop and while loop.
Described in Android document: Iterable<T>: Instances of classes that implement this interface can be used with the enhanced for loop. In Java 6 document (Android now support JDK6), this interface allows an object to be the target of the "foreach" statement.
Here is example to use Iterable in for loop and while loop.
package com.example.androiditerable;
import java.util.ArrayList;
import java.util.Iterator;
import android.os.Bundle;
import android.app.Activity;
import android.widget.TextView;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView text_for = (TextView)findViewById(R.id.result1);
TextView text_while = (TextView)findViewById(R.id.result2);
ArrayList<String> arrayList = new ArrayList<String>();
arrayList.add("Sunday");
arrayList.add("Monday");
arrayList.add("Tuesday");
arrayList.add("Wednesday");
arrayList.add("Thursday");
arrayList.add("Friday");
arrayList.add("Saturday");
String result_for = "";
for(String item : arrayList){
result_for += item + "\n";
}
text_for.setText(result_for);
Iterator<String> iterator = arrayList.iterator();
String result_while = "";
while (iterator.hasNext()){
result_while += iterator.next() + "\n";
}
text_while.setText(result_while);
}
}
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
<TextView
android:id="@+id/result1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/result2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>