⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jahiasearchhit.java

📁 java 写的一个新闻发布系统
💻 JAVA
字号:
////                                   ____.//                       __/\ ______|    |__/\.     _______//            __   .____|    |       \   |    +----+       \//    _______|  /--|    |    |    -   \  _    |    :    -   \_________//   \\______: :---|    :    :           |    :    |         \________>//           |__\---\_____________:______:    :____|____:_____\//                                      /_____|////                 . . . i n   j a h i a   w e   t r u s t . . .//// DJ       03.01.2001package org.jahia.data.search;import java.util.Comparator;import org.jahia.services.pages.JahiaPage;/** * This class defines what does a search "hit" looks like. * One hit is one page found by jahia containing at least one time the searchstring * in one of its fields. * * @see org.jahia.data.search.JahiaSearchResult * @see org.jahia.engines.search.Search_Engine * @author DJ */public class JahiaSearchHit implements Comparator {	    public int         id;    public Object      obj;    public int         wordcount;   	/**     * A small string coming from this page, usually containing one of the searched words.     * Currently: one of the fields containing this word.     */    public String      teaser;	/** Deprecated , use id instead */	        public int         pageID;	/** Deprecated , use obj instead */	        public JahiaPage   page;    //-------------------------------------------------------------------------    /**      * Compare between two objects, sort by their wordcount.	 *     * @param Object     * @param Object     */	public int compare(Object c1, Object c2) throws ClassCastException {				JahiaSearchHit hit1 = (JahiaSearchHit)c1;		JahiaSearchHit hit2 = (JahiaSearchHit)c2;		if ( hit2.wordcount > hit1.wordcount ){			return 1;		} else if ( hit1.wordcount == hit2.wordcount ){			return 0;		}		return -1;	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -