Package org.apache.commons.collections.comparators

Examples of org.apache.commons.collections.comparators.NullComparator


/*     */   public static Comparator nullHighComparator(Comparator comparator)
/*     */   {
/* 179 */     if (comparator == null) {
/* 180 */       comparator = NATURAL_COMPARATOR;
/*     */     }
/* 182 */     return new NullComparator(comparator, true);
/*     */   }
View Full Code Here


     * OrderedMap uses TreeMap as its known comparison.
     *
     * @return a map that is known to be valid
     */
    public Map makeConfirmedMap() {
        return new TreeMap(new NullComparator());
    }
View Full Code Here

     * The only confirmed collection we have that is ordered is the sorted one.
     * Thus, sort the keys.
     */
    public Object[] getSampleKeys() {
        List list = new ArrayList(Arrays.asList(super.getSampleKeys()));
        Collections.sort(list, new NullComparator());
        return list.toArray();
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.comparators.NullComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.