Code example for Collator

Methods: setStrength

     * Creates a new instance of NameOrder. 
    public NameOrder() { 
     * Do string compare of names of UML objects.  Comparison is 
     * case insensitive using a primary strength collator in the user's 
     * locale. 
     * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) 
    public int compare(Object obj1, Object obj2) {
	if (obj1 instanceof DefaultMutableTreeNode) {
	    DefaultMutableTreeNode node = (DefaultMutableTreeNode) obj1;
	    obj1 = node.getUserObject();
Stop searching for code, let great code find you!  Add Codota to your java IDE