ostore.introspect
Class SemanticDistanceModel.Tuple

java.lang.Object
  |
  +--ostore.introspect.SemanticDistanceModel.Tuple
All Implemented Interfaces:
QuickSerializable
Enclosing class:
SemanticDistanceModel

public static class SemanticDistanceModel.Tuple
extends Object
implements QuickSerializable

A <QuickSerializable obs,Distance d, int num> tuple.

Version:
$Id: SemanticDistanceModel.java,v 1.11 2003/11/17 23:52:43 emilong Exp $
Author:
Jeff Pang

Constructor Summary
SemanticDistanceModel.Tuple(InputBuffer buffer)
           
SemanticDistanceModel.Tuple(QuickSerializable t, Distance d, int num)
          Constructor.
 
Method Summary
 boolean equals(Object other)
           
 Distance getDistance()
          Get the distance value.
 QuickSerializable getKey()
          Get the observation type.
 int getNum()
          Get the approximate number of measurements incorporated into this distance approximation.
 Distance getPriority()
          Get the priority of this tuple in a queue.
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 void setDistance(Distance d)
          Set the distance value.
 void setNum(int num)
          Set the approx number of measurements incorporated into this distance approximation.
 void setPriority(Distance prio)
          Set the priority of this tuple in a queue.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SemanticDistanceModel.Tuple

public SemanticDistanceModel.Tuple(QuickSerializable t,
                                   Distance d,
                                   int num)
Constructor.

Parameters:
t - the observation type (key)
d - the distance value
num - the approx number of measurements that have been incoporatded into this distance value

SemanticDistanceModel.Tuple

public SemanticDistanceModel.Tuple(InputBuffer buffer)
                            throws QSException
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

Specified by:
serialize in interface QuickSerializable
Parameters:
buffer - the output buffer to add the object to

getKey

public QuickSerializable getKey()
Get the observation type.


getDistance

public Distance getDistance()
Get the distance value.


setDistance

public void setDistance(Distance d)
Set the distance value.


getNum

public int getNum()
Get the approximate number of measurements incorporated into this distance approximation.


setNum

public void setNum(int num)
Set the approx number of measurements incorporated into this distance approximation.


getPriority

public Distance getPriority()
Get the priority of this tuple in a queue.


setPriority

public void setPriority(Distance prio)
Set the priority of this tuple in a queue.


equals

public boolean equals(Object other)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object