1 package baseCode.common;
2
3 import java.util.Collection;
4
5 /***
6 * An object whose distance to other objects can be measured. It is up to the implementer to determine that the two
7 * objects being compared are of the same type.
8 * <hr>
9 * <p>
10 * Copyright (c) 2004 Columbia University
11 *
12 * @author pavlidis
13 * @version $Id: Distanceable.java,v 1.2 2004/08/02 15:03:43 pavlidis Exp $
14 */
15 public abstract class Distanceable extends Visitable {
16
17 /***
18 * @param a
19 * @return
20 */
21 public abstract double distanceTo( Distanceable a );
22
23 /***
24 * Return a collections view of the object. The implementer has to make sure the Collection is of Distanceables.
25 *
26 * @return @todo not very elegant...
27 */
28 public abstract Collection toCollection();
29
30 }