de.lmu.ifi.dbs.elki.distance
Class AbstractDistance<D extends AbstractDistance<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.distance.AbstractDistance<D>
- All Implemented Interfaces:
- Distance<D>, Loggable, Externalizable, Serializable, Comparable<D>
- Direct Known Subclasses:
- CorrelationDistance, NumberDistance, SubspaceDistance
abstract class AbstractDistance<D extends AbstractDistance<D>>
- extends AbstractLoggable
- implements Distance<D>
An abstract distance implements equals conveniently for any extending class.
At the same time any extending class is to implement hashCode properly.
- Author:
- Arthur Zimek
Method Summary |
boolean |
equals(Object o)
Returns true if o is of the same class as this instance
and this.compareTo(o) is 0,
false otherwise. |
abstract int |
hashCode()
Any extending class should implement a proper hashCode method. |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
AbstractDistance
protected AbstractDistance()
- Sets as debug status
LoggingConfiguration.DEBUG
.
hashCode
public abstract int hashCode()
- Any extending class should implement a proper hashCode method.
- Overrides:
hashCode
in class Object
- See Also:
Object.hashCode()
equals
public boolean equals(Object o)
- Returns true if o is of the same class as this instance
and
this.compareTo(o)
is 0,
false otherwise.
- Overrides:
equals
in class Object
- See Also:
Object.equals(Object)