Package com.browseengine.bobo.util.IntBoundedPriorityQueue

Examples of com.browseengine.bobo.util.IntBoundedPriorityQueue.IntComparator


    pathSpec.setOrderBy(FacetSortSpec.OrderByCustom);
    pathSpec.setCustomComparatorFactory(new ComparatorFactory(){

      public IntComparator newComparator(
          FieldValueAccessor fieldValueAccessor, final int[] counts) {
        return new IntComparator(){

          public int compare(Integer f1, Integer f2) {
            int val = counts[f2] - counts[f1];
            if (val==0)
                {
View Full Code Here


    numberSpec.setCustomComparatorFactory(new ComparatorFactory() {
     
      public IntComparator newComparator(final FieldValueAccessor fieldValueAccessor,
          final int[] counts) {
       
        return new IntComparator(){

          public int compare(Integer v1, Integer v2) {
            Integer size1 = (Integer)fieldValueAccessor.getRawValue(v1);
            Integer size2 = (Integer)fieldValueAccessor.getRawValue(v2);
           
View Full Code Here

    pathSpec.setCustomComparatorFactory(new ComparatorFactory() {

      @Override
      public IntComparator newComparator(FieldValueAccessor fieldValueAccessor,
          final BigSegmentedArray counts) {
        return new IntComparator() {

          @Override
          public int compare(Integer f1, Integer f2) {
            int val = counts.get(f2) - counts.get(f1);
            if (val == 0) {
View Full Code Here

      @Override
      public IntComparator newComparator(final FieldValueAccessor fieldValueAccessor,
          final BigSegmentedArray counts) {

        return new IntComparator() {

          @Override
          public int compare(Integer v1, Integer v2) {
            Integer size1 = (Integer) fieldValueAccessor.getRawValue(v1);
            Integer size2 = (Integer) fieldValueAccessor.getRawValue(v2);
View Full Code Here

          if (comparatorFactory == null){
            throw new IllegalArgumentException("facet comparator factory not specified");
          }

          final IntComparator comparator = comparatorFactory.newComparator(new FieldValueAccessor(){

            public String getFormatedValue(int index) {
              return valList.get(index);
            }
View Full Code Here

public class FacetValueComparatorFactory implements ComparatorFactory {

  public IntComparator newComparator(
      FieldValueAccessor fieldValueAccessor, BigSegmentedArray counts) {
    return new IntComparator(){
      public int compare(Integer o1, Integer o2) {
        return o2-o1;
      }
     
      @SuppressWarnings("unused")
View Full Code Here

          if (comparatorFactory == null){
            throw new IllegalArgumentException("facet comparator factory not specified");
          }

          IntComparator comparator = comparatorFactory.newComparator(new FieldValueAccessor(){

            public String getFormatedValue(int index) {
              return getFacetString(index);
            }
View Full Code Here

          if (comparatorFactory == null){
            throw new IllegalArgumentException("facet comparator factory not specified");
          }

          final IntComparator comparator = comparatorFactory.newComparator(new FieldValueAccessor(){
              public String getFormatedValue(int index)
              {
                return _predefinedRanges.get(index);
              }
View Full Code Here

public class FacetHitcountComparatorFactory implements ComparatorFactory {
  public IntComparator newComparator(FieldValueAccessor valueList,
      final BigSegmentedArray counts) {
   
    return new IntComparator(){

      public int compare(Integer f1, Integer f2) {
        int val = counts.get(f1) - counts.get(f2);
        if (val==0)
        {
View Full Code Here

          if (comparatorFactory == null){
            throw new IllegalArgumentException("facet comparator factory not specified");
          }

          final IntComparator comparator = comparatorFactory.newComparator(new FieldValueAccessor(){

            public String getFormatedValue(int index) {
              return valList.get(index);
            }
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.util.IntBoundedPriorityQueue.IntComparator

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.