|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lempinen.neatseeker.core.Pointer
Represents single Target in the TargetIndex for a particular keyword.
The Pointer class contains the information related to a single keyword in a single target. This, like many other things in life, is perhaps best illustrated by an example:
Lets assume that the file /etc/killfile
contains two
instances of the word Microsoft (a double-kill for Unreal
Tournament enthusiasts). This words are located at positions 13 and 42.
Let's also assume that when a RepositoryMaker started indexing the file,
it created a Target with the index 666 for /etc/killfile
.
Thus, the bucket mic.map
(depending on your hashing method,
of course) will contain a key-value pair for the term Microsoft.
The value is a PointerList, and within that list lives a Pointer, with
the ID 666 and a sequences attribute that contains the numbers 13 and 42.
Simple, huh?
Field Summary | |
protected long |
id
|
protected java.util.Vector |
sequences
|
protected float |
weight
|
Constructor Summary | |
Pointer()
Creates an empty Pointer instance. |
|
Pointer(long i)
Creates a Pointer instance with the given ID. |
Method Summary | |
void |
addSequence(java.lang.Long seq)
Adds a sequence (a word position) within the Target. |
boolean |
equals(java.lang.Object anotherObject)
Compares two Pointers. |
long |
getID()
Returns the ID of the Target. |
java.util.Vector |
getSequences()
Returns the list of word positions within the Target. |
float |
getWeight()
Returns weight of the Pointer. |
private void |
readObject(java.io.ObjectInputStream in)
Reads a serialized object. |
void |
setID(long i)
Sets the ID of the Target. |
void |
setSequences(java.util.Vector s)
Sets the full list of word positions. |
void |
setWeight(float w)
Sets the weight of the Pointer. |
java.lang.String |
toString()
Returns a String representation of the Pointer. |
private void |
writeObject(java.io.ObjectOutputStream out)
Writes the object in a serialized form. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected long id
protected java.util.Vector sequences
protected float weight
Constructor Detail |
public Pointer()
public Pointer(long i)
Method Detail |
public void setID(long i)
public long getID()
public void addSequence(java.lang.Long seq)
public java.util.Vector getSequences()
public void setSequences(java.util.Vector s)
public void setWeight(float w)
public float getWeight()
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
public boolean equals(java.lang.Object anotherObject)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |