Examples of ComparableComparator


Examples of org.gwtoolbox.commons.collections.client.ComparableComparator

                    if (sortable) {
                        menu.addSeparator();
                    }
                    menu.addItem("Group By This Field", new Command() {
                        public void execute() {
                            FieldGroup group = new FieldGroup(getName(), fieldName, new ComparableComparator());
                            grid.setGroupBy(group);
                        }
                    });
                }
            }
View Full Code Here

Examples of org.helidb.util.ComparableComparator

      return find((K) key);
    }
    else if (mode == SearchMode.CLOSEST_ABOVE || mode == SearchMode.CLOSEST_BELOW || mode == SearchMode.CLOSEST_MATCH)
    {
      // assume type of search key is K
      FindClosestMatchCallback<K, P> fcmc = new FindClosestMatchCallback<K, P>((K) key, mode, (Comparator<? super K>) new ComparableComparator());
      forEachKey(fcmc);
      return fcmc.m_posOfClosestMatch;
    }
    else
    {
View Full Code Here

Examples of org.helidb.util.ComparableComparator

    if (m_logAdapterHolder.isTraceEnabled())
    {
      m_logAdapterHolder.logTrace("Database.find(key, mode) called");
    }
    assertIsComparable(key);
    return findWithComparatorInternal(key, mode, new ComparableComparator());
  }
View Full Code Here

Examples of org.infinispan.objectfilter.impl.util.ComparableComparator

   public void addPredicate(PredicateIndex.Subscription subscription) {
      Subscriptions subscriptions;
      if (subscription.getPredicate().getInterval() != null) {
         if (orderedPredicates == null) {
            // in this case AttributeDomain extends Comparable for sure
            orderedPredicates = new IntervalTree<AttributeDomain, Subscriptions>(new ComparableComparator());
         }
         IntervalTree.Node<AttributeDomain, Subscriptions> n = orderedPredicates.add(subscription.getPredicate().getInterval());
         if (n.value == null) {
            subscriptions = new Subscriptions(subscription.getPredicate());
            n.value = subscriptions;
View Full Code Here

Examples of org.infinispan.objectfilter.impl.util.ComparableComparator

   public void addPredicate(PredicateIndex.Subscription subscription) {
      Subscriptions subscriptions;
      if (subscription.getPredicate().getInterval() != null) {
         if (orderedPredicates == null) {
            // in this case AttributeDomain extends Comparable for sure
            orderedPredicates = new IntervalTree<AttributeDomain, Subscriptions>(new ComparableComparator());
         }
         IntervalTree.Node<AttributeDomain, Subscriptions> n = orderedPredicates.add(subscription.getPredicate().getInterval());
         if (n.value == null) {
            subscriptions = new Subscriptions(subscription.getPredicate());
            n.value = subscriptions;
View Full Code Here

Examples of org.springframework.util.comparator.ComparableComparator

        } catch (IllegalArgumentException iae) {
            // expected
        }

        try {
            createBetweenCondition(null, new Integer(3), new ComparableComparator());
            fail("An IllegalArgumentException must be thrown if the condition is initialized with a null lower bound");
        } catch (IllegalArgumentException iae) {
            // expected
        }
    }
View Full Code Here

Examples of org.springframework.util.comparator.ComparableComparator

        } catch (IllegalArgumentException iae) {
            // expected
        }

        try {
            createBetweenCondition(new Integer(3), null, new ComparableComparator());
            fail("An IllegalArgumentException must be thrown if the condition is initialized with a null upper bound");
        } catch (IllegalArgumentException iae) {
            // expected
        }
    }
View Full Code Here

Examples of org.springframework.util.comparator.ComparableComparator

        } catch (IllegalArgumentException iae) {
            // expected
        }

        try {
            createCondition(null, new ComparableComparator());
            fail("An IllegalArgumentException must be thrown if the condition is initialized with a null bound");
        } catch (IllegalArgumentException iae) {
            // expected
        }
    }
View Full Code Here

Examples of org.springframework.util.comparator.ComparableComparator

      logger.debug("Populating combo box model with enums of type '" + enumType.getName() + "'; enums are ["
          + enumValues + "]");
    }
    CompoundComparator comparator = new CompoundComparator();
    comparator.addComparator(LabeledEnum.LABEL_ORDER);
    comparator.addComparator(new ComparableComparator());
    comboBox.setModel(new ComboBoxListModel(new ArrayList(enumValues), comparator));
    comboBox.setRenderer(new LabeledEnumListRenderer(messageSource));
    comboBox.setEditor(new LabeledEnumComboBoxEditor(messageSource, comboBox.getEditor()));
  }
View Full Code Here

Examples of org.springframework.util.comparator.ComparableComparator

    protected void doBindControl(ListModel bindingModel) {
        setRenderer(new LabeledEnumListRenderer(getMessageSource()));
        setEditor(new LabeledEnumComboBoxEditor(getMessageSource(), getEditor()));
        CompoundComparator comparator = new CompoundComparator();
        comparator.addComparator(LabeledEnum.LABEL_ORDER);
        comparator.addComparator(new ComparableComparator());
        setComparator(comparator);
        super.doBindControl(bindingModel);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.