-
·
[TUT] Easier / Quicker Generic Collection Creation
Sick of repeating your generics declaration?Sick of repeating your generics declaration? [java] List<SomeObject> listOfSomething = new ArrayList<SomeObject>(); Map<SomeKey, SomeObject> mapOfSomething = new HashMap<SomeKey, SomeObject>(); [/java] For a quick and easy way to create a collection of objects you can do the below. Create yourself a util class: [java] package com.blundell.util; import java.util.ArrayList; import java.util.HashMap; public…
-
·
[TUT] Array List of countries for arrays.xml
Just created these two matching pair array’s of countries and county codes thought I would share them with everyone since I couldn’t find them myself. Could use the full names for a spinner selection and the short hand for database storage / look up / sending to a server. Or anything else! The Countries list,…