nrc.fuzzy
Class YValueOutOfRangeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--nrc.fuzzy.FuzzyException
                    |
                    +--nrc.fuzzy.FuzzySetException
                          |
                          +--nrc.fuzzy.YValueOutOfRangeException
All Implemented Interfaces:
java.io.Serializable

public class YValueOutOfRangeException
extends FuzzySetException
implements java.io.Serializable

The YValueOutOfRangeException class is thrown to indicate that a y value, or membership value, in a FuzzySet does not fall within strict range of 0.0 to 1.0 inclusive, or [0.0, 1.0]. This exception is thrown almost exclusively by the FuzzySet constructors, which in turn affects most methods that construct a new FuzzySet in the course of their execution.

In the construction of a YValueOutOfRangeException, the offending y value, will be stored in the exception. The method getYValue will return this values. This value will also appear in the exception message, should the user call the getMessage method.

See Also:
FuzzySetException, Serialized Form

Constructor Summary
YValueOutOfRangeException(double yValue)
          Constructs a new YValueOutOfRangeException without a specific detail message.
YValueOutOfRangeException(double yValue, java.lang.String message)
          Constructs a new YValueOutOfRangeException with a specific detail message appended to the default detail message.
 
Method Summary
 java.lang.String getMessage()
          Returns the detail message to the user.
 double getYValue()
          Returns the offending y value.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

YValueOutOfRangeException

public YValueOutOfRangeException(double yValue)
Constructs a new YValueOutOfRangeException without a specific detail message. The default detail message informs the user that the y values of a FuzzySet must be in the strict range of [0.0, 1.0], and provides the user with the value of the offending y value.

Parameters:
yValue - the y value with a value outside of the range [0.0, 1.0]

YValueOutOfRangeException

public YValueOutOfRangeException(double yValue,
                                 java.lang.String message)
Constructs a new YValueOutOfRangeException with a specific detail message appended to the default detail message. The default detail message informs the user that the y values of a FuzzySet must be in the strict range of [0.0, 1.0], and provides the user with the value of the offending y value.

Parameters:
yValue - the y value with a value outside of the range [0.0, 1.0]
message - the specific detail message
Method Detail

getYValue

public double getYValue()
Returns the offending y value. This y value has a value outside the acceptable range of [0.0, 1.0].

Returns:
the y value outside the acceptable range

getMessage

public java.lang.String getMessage()
Returns the detail message to the user.

Overrides:
getMessage in class java.lang.Throwable
Returns:
the String detail message to inform the user of some of the particulars of the situation that caused the exception to be thrown