common-util

local.tomas.faces.ui
Class SelectItemComparator

java.lang.Object
  extended by local.tomas.faces.ui.SelectItemComparator
All Implemented Interfaces:
Comparator<javax.faces.model.SelectItem>

public final class SelectItemComparator
extends Object
implements Comparator<javax.faces.model.SelectItem>

Comparator for JSF select items. Compares the labels of the items ignoring case.

Author:
tomas.teubner

Method Summary
 int compare(javax.faces.model.SelectItem o1, javax.faces.model.SelectItem o2)
           
static SelectItemComparator getInstance()
          Get singleton instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Method Detail

compare

public int compare(javax.faces.model.SelectItem o1,
                   javax.faces.model.SelectItem o2)
Specified by:
compare in interface Comparator<javax.faces.model.SelectItem>

getInstance

public static SelectItemComparator getInstance()
Get singleton instance.

Returns:
The instance.

common-util

Copyright © 2007 null. All Rights Reserved.