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
Distance.InfiniteDistance
public Distance.InfiniteDistance()
Distance.InfiniteDistance
public Distance.InfiniteDistance(InputBuffer buffer)
throws QSException
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