Code example for Collator

Methods: compare

0
 
    private final static Comparator<Map<String, ?>> sDisplayNameComparator = new Comparator<Map<String, ?>>() {
        private final Collator collator = Collator.getInstance(); 
 
        public int compare(Map<String,?> map1, Map<String,?> map2) { 
            return collator.compare(map1.get("title"), map2.get("title")); 
        } 
    }; 
 
    protected Intent activityIntent(String pkg, String componentName) {
        Intent result = new Intent();
        result.setClassName(pkg, componentName);
        return result;
    } 
 
    protected Intent browserIntent(String path) {
        Intent result = new Intent();
        result.setClass(this, Cocos2D.class);
        result.putExtra("org.cocos2d.tests.Path", path);
        return result;
    }