All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.browseengine.bobo.service.HitCompareMulti Maven / Gradle / Ivy

Go to download

Bobo is a Faceted Search implementation written purely in Java, an extension of Apache Lucene

The newest version!
package com.browseengine.bobo.service;

import java.util.Comparator;

import com.browseengine.bobo.api.BrowseHit;

public class HitCompareMulti implements Comparator {
  protected Comparator[] m_hcmp;

  public HitCompareMulti(Comparator[] hcmp) {
    m_hcmp = hcmp;
  }

  // HitCompare
  public int compare(BrowseHit h1, BrowseHit h2) {
    int retVal = 0;
    for (int i = 0; i < m_hcmp.length; ++i) {
      retVal = m_hcmp[i].compare(h1, h2);
      if (retVal != 0) break;
    }
    return retVal;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy