|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.fuzzyservices.beans.FuzzyNumber
public class FuzzyNumber
This class represents a fuzzy number according to JavaBeans conventions.
FuzzyNumber,
Serialized Form| Field Summary | |
|---|---|
static String |
MEMBERSHIP_FUNCTION_PROPERTY
Bound property name for membershipFunction. |
static String |
NEGATIVE_PROPERTY
Bound property name for negative. |
static String |
POSITIVE_PROPERTY
Bound property name for positive. |
static String |
VALID_FUZZY_LR_NUMBER_PROPERTY
Bound property name for validFuzzyLRNumber. |
| Constructor Summary | |
|---|---|
FuzzyNumber()
Default FuzzyNumber constructor. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
Object |
clone()
|
boolean |
equals(Object obj)
|
int |
getId()
Returns the technical identifier (e.g. within a database). |
MembershipFunction |
getMembershipFunction()
Returns the membership function. |
int |
hashCode()
|
void |
invert()
Inverts this fuzzy number. |
boolean |
isNegative()
Checks whether the fuzzy number is negative. |
boolean |
isPositive()
Checks whether the fuzzy number is positive. |
boolean |
isValidFuzzyLRNumber()
Checks whether the fuzzy number fulfills the requirements of a fuzzy LR number. |
void |
negate()
Negates this fuzzy number. |
void |
propertyChange(PropertyChangeEvent evt)
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
setMembershipFunction(MembershipFunction newMembershipFunction)
Sets the membership function. |
String |
toString()
|
String |
toString(boolean withMembershipFunction)
Returns a textual representation of the fuzzy number |
void |
vetoableChange(PropertyChangeEvent evt)
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String MEMBERSHIP_FUNCTION_PROPERTY
membershipFunction.
public static final String NEGATIVE_PROPERTY
negative.
public static final String POSITIVE_PROPERTY
positive.
public static final String VALID_FUZZY_LR_NUMBER_PROPERTY
validFuzzyLRNumber.
| Constructor Detail |
|---|
public FuzzyNumber()
FuzzyNumber constructor. This constructor
creates a valid default fuzzy number with the coordinates (0.0, 0.0),
(1.0, 1.0) and (2.0, 0.0).
| Method Detail |
|---|
public int getId()
public final MembershipFunction getMembershipFunction()
membershipFunction propertysetMembershipFunction(MembershipFunction)public final void setMembershipFunction(MembershipFunction newMembershipFunction)
newMembershipFunction - The new value for the property.getMembershipFunction()
public final void invert()
throws PropertyVetoException
PropertyVetoException - when the attempt to set the property is
vetoed by a listenerpublic final boolean isNegative()
true if fuzzy number is negative, false otherwisepublic final boolean isPositive()
true if fuzzy number is positive, false otherwisepublic final boolean isValidFuzzyLRNumber()
true if the fuzzy set would be a fuzzy LR number
false, otherwise#isValidFuzzyNumber
public final void negate()
throws PropertyVetoException
PropertyVetoException - when the attempt to set the property is
vetoed by a listenerpublic final void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener to the listener list. The
listener is registered for all properties.
A PropertyChangeEvent will get fired in response to setting
a bound property.
listener - the PropertyChangeListener to be addedpublic final void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener from the listener list.
This removes a PropertyChangeListener that was registered
for all properties.
listener - the PropertyChangeListener to be removedpublic final void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListener
public final void vetoableChange(PropertyChangeEvent evt)
throws PropertyVetoException
vetoableChange in interface VetoableChangeListenerPropertyVetoExceptionpublic Object clone()
clone in class Objectpublic final boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic String toString(boolean withMembershipFunction)
withMembershipFunction - true if all points of membership function are also returned,
false otherwise.
MembershipFunction.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||