Code example for Collator

Methods: compare

0
    private final static Comparator<Map<String, Object>> sDisplayNameComparator =
        new Comparator<Map<String, Object>>() { 
        private final Collator   collator = Collator.getInstance(); 
 
        public int compare(Map<String, Object> map1, Map<String, Object> 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 browseIntent(String path) {
        Intent result = new Intent();
        result.setClass(this, Demos.class);
        result.putExtra("com.example.android.apis.Path", path);
        return result;
    }