Class PointerList

All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable

public class PointerList
extends java.util.Vector
implements java.io.Serializable

Represents a list of Pointers for a particular keyword. OK, if you read the description of the Bucket class, you may have thought that the TreeMaps contain Pointers to the target documents. Well, I lied.

In fact, every keyword in a Bucket points to a PointerList, which is, well, a list of Pointers. Whereas a Pointer points to a single Target, a PointerList contains all of the Pointers to different Targets.

Therefore, when you ask a Bucket for the PointerList for the key Microsoft, for example, you get a list of Pointers to all the documents that contain the word Microsoft. Amazing, no?

PointerList in itself is little more than a Vector that contains the individual Pointers. It provides a single method for adding a new Entry to the list, as well as functions for performing arithmetic on the PointerLists.

$Id: PointerList.java,v 1.1 2000/09/23 11:21:23 lempinen Exp $
Sami Lempinen
See Also:
Pointer, Serialized Form

Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData, serialVersionUID
Fields inherited from class java.util.AbstractList
Constructor Summary
Method Summary
 void addEntry(Entry entry)
protected  Pointer checkProximity(Pointer p1, Pointer p2, long proximity, boolean ordered)
          Check the word sequences in two Pointers for proximity.
 PointerList not(PointerList another)
          Implements the NOT logical operator for two PointerLists.
 PointerList proximity(PointerList another, long proximity, boolean ordered)
          Performs a proximity search between two PointerLists.
 PointerList union(PointerList another)
          Returns the common elements in the two PointerLists.
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, ensureCapacityHelper, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, readObject, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize, writeObject
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
Methods inherited from class java.lang.Object
, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
Methods inherited from interface java.util.List
iterator, listIterator, listIterator

Constructor Detail


public PointerList()
Method Detail


public void addEntry(Entry entry)


public PointerList union(PointerList another)
Returns the common elements in the two PointerLists.


public PointerList proximity(PointerList another,
                             long proximity,
                             boolean ordered)
Performs a proximity search between two PointerLists.


protected Pointer checkProximity(Pointer p1,
                                 Pointer p2,
                                 long proximity,
                                 boolean ordered)
Check the word sequences in two Pointers for proximity.


public PointerList not(PointerList another)
Implements the NOT logical operator for two PointerLists.