swishej
Class ResultList

java.lang.Object
  |
  +--swishej.ResultList

class ResultList
extends java.lang.Object

Representation of search result lists

See Also:
Search

Field Summary
(package private)  Result first
          First result in list.
(package private)  Result last
          Last result in list.
 
Constructor Summary
(package private) ResultList()
          Create new empty result list.
 
Method Summary
(package private)  void add(int filenum, int rank, int structure)
          Add result described by three integer numbers to result list
(package private) static ResultList andresultlists(ResultList r1, ResultList r2, int andLevel)
          AND two result lists by traversing over all elements and accumulating rank information for elements which occur in both lists.
(package private)  boolean empty()
          Test result list being empty.
(package private) static void mergeResult(int f, int r, int s, java.util.Hashtable list)
          Merge result described by three integer numbers into a local result list
(package private) static ResultList notresultlist(ResultList rl, int maxfilenum)
          NOT a result list and return a new result list.
(package private) static ResultList orresultlists(ResultList r1, ResultList r2)
          OR two result lists by merging all results and forming a new result list.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

first

Result first
First result in list.

last

Result last
Last result in list.
Constructor Detail

ResultList

ResultList()
Create new empty result list.
Method Detail

mergeResult

static void mergeResult(int f,
                        int r,
                        int s,
                        java.util.Hashtable list)
Merge result described by three integer numbers into a local result list
Parameters:
f - file number (short)
r - rank for sorting
s - structure tag
list - table which holds the merged results

add

void add(int filenum,
         int rank,
         int structure)
Add result described by three integer numbers to result list
Parameters:
f - file number (short)
r - rank for sorting
s - structure tag

empty

boolean empty()
Test result list being empty.
Returns:
true if the result list is empty, false otherwise

orresultlists

static ResultList orresultlists(ResultList r1,
                                ResultList r2)
OR two result lists by merging all results and forming a new result list.
Parameters:
r1 - first result list or null
r2 - second result list or null
Returns:
new ResultList

andresultlists

static ResultList andresultlists(ResultList r1,
                                 ResultList r2,
                                 int andLevel)
AND two result lists by traversing over all elements and accumulating rank information for elements which occur in both lists. A new result list is produced.
Parameters:
r1 - first result list or null
r2 - second result list or null
Returns:
new ResultList

notresultlist

static ResultList notresultlist(ResultList rl,
                                int maxfilenum)
NOT a result list and return a new result list.
Parameters:
rl - result list to be NOTed
maxfilenum - highest short file number
Returns:
new ResultList


Contact: Christian.Werner@t-online.de