デモ

0→0→integer
-----
1→1→string
-----
2→1→boolean
-----
3→3→integer
-----
4→4→double
-----