viper.comparison.distances
Class UnknownDistanceException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byjava.lang.ClassCastException
                  extended byviper.comparison.distances.UnknownDistanceException
All Implemented Interfaces:
java.io.Serializable

public class UnknownDistanceException
extends java.lang.ClassCastException

Runtime exception that is thrown when trying to get a distance that has not been registered. Often thrown due to misspelling or something.

Author:
davidm
See Also:
Serialized Form

Constructor Summary
UnknownDistanceException()
          Creates a new instance of UnknownDistanceException without detail message.
UnknownDistanceException(Measurable measurable, java.lang.String distance)
          Constructs an instance of UnknownDistanceException with the specified detail message.
UnknownDistanceException(java.lang.String msg)
          Constructs an instance of UnknownDistanceException with the specified detail message.
UnknownDistanceException(java.lang.String measurable, java.lang.String distance)
          Constructs an instance of UnknownDistanceException with the specified detail message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnknownDistanceException

public UnknownDistanceException()
Creates a new instance of UnknownDistanceException without detail message.


UnknownDistanceException

public UnknownDistanceException(java.lang.String msg)
Constructs an instance of UnknownDistanceException with the specified detail message.

Parameters:
msg - the detail message.

UnknownDistanceException

public UnknownDistanceException(java.lang.String measurable,
                                java.lang.String distance)
Constructs an instance of UnknownDistanceException with the specified detail message.

Parameters:
measurable - The measurable type that should support the given distance
distance - The name of the distance functor that was not found.

UnknownDistanceException

public UnknownDistanceException(Measurable measurable,
                                java.lang.String distance)
Constructs an instance of UnknownDistanceException with the specified detail message.

Parameters:
measurable - The measurable type that should support the given distance
distance - The name of the distance functor that was not found.