ostore.introspect
Class Distance.InfiniteDistance

java.lang.Object
  |
  +--ostore.introspect.Distance.InfiniteDistance
All Implemented Interfaces:
Comparable, Distance, QuickSerializable
Enclosing class:
Distance

public static final class Distance.InfiniteDistance
extends Object
implements Distance

Special distance value representing infinity. Subclasses of Distance must be able to handle this value properly.

Version:
$Id: Distance.java,v 1.4 2003/04/03 01:10:22 jeffpang Exp $
Author:
Jeff Pang

Nested Class Summary
 
Nested classes inherited from class ostore.introspect.Distance
Distance.InfiniteDistance
 
Field Summary
 
Fields inherited from interface ostore.introspect.Distance
INFINITY
 
Constructor Summary
Distance.InfiniteDistance()
           
Distance.InfiniteDistance(InputBuffer buffer)
           
 
Method Summary
 int compareTo(Object other)
           
 Distance difference(Distance other)
           
 boolean equals(Object other)
           
 Distance pow(int power)
           
 Distance scale(double factor)
           
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 Distance sum(Distance other)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Distance.InfiniteDistance

public Distance.InfiniteDistance()

Distance.InfiniteDistance

public Distance.InfiniteDistance(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

equals

public boolean equals(Object other)
Specified by:
equals in interface Distance
Overrides:
equals in class Object
Returns:
this == other

sum

public Distance sum(Distance other)
Specified by:
sum in interface Distance
Returns:
this + other

difference

public Distance difference(Distance other)
Specified by:
difference in interface Distance
Returns:
this - other

pow

public Distance pow(int power)
Specified by:
pow in interface Distance
Returns:
this^pow

scale

public Distance scale(double factor)
Specified by:
scale in interface Distance
Returns:
factor * this

compareTo

public int compareTo(Object other)
Specified by:
compareTo in interface Comparable

toString

public String toString()
Overrides:
toString in class Object