nrc.fuzzy
Class NoXValueForMembershipException

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

public class NoXValueForMembershipException
extends FuzzySetException
implements java.io.Serializable

The NoXValueForMembershipException class is thrown to indicate that an X value corresponding to a membership value could not be found for the given FuzzySet/FuzzyValue. This exception is thrown exclusively by the FuzzySet getXForMembership method.

In the construction of a NoXValueForMembershipException, the offending membership value, will be stored in the exception. This value will also appear in the exception message, should the user call the getMessage method.

See Also:
FuzzySetException, Serialized Form

Constructor Summary
NoXValueForMembershipException(double yValue)
          Constructs a new NoXValueForMembershipException without a specific detail message.
NoXValueForMembershipException(double yValue, java.lang.String message)
          Constructs a new NoXValueForMembershipException with a specific 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

NoXValueForMembershipException

public NoXValueForMembershipException(double yValue)
Constructs a new NoXValueForMembershipException without a specific detail message. The default detail message informs the user that the y value did not have a corresponding x value in the FuzzySet .

Parameters:
yValue - the y value with no corresponding x value for the fuzzy set

NoXValueForMembershipException

public NoXValueForMembershipException(double yValue,
                                      java.lang.String message)
Constructs a new NoXValueForMembershipException with a specific detail message. The default detail message informs the user that the y value did not have a corresponding x value in the FuzzySet .

Parameters:
yValue - the y value with no corresponding x value for the fuzzy set
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