net.sourceforge.fuzzyservices.beans
Class Fact

java.lang.Object
  extended by net.sourceforge.fuzzyservices.beans.Fact
All Implemented Interfaces:
Serializable

public class Fact
extends Object
implements Serializable

This class represents a fact according to JavaBeans conventions.

Version:
1.0
Author:
Uwe Weng
See Also:
Fact, Serialized Form

Field Summary
static String LINGUISTIC_VARIABLE_NAME_PROPERTY
          Bound property name for linguisticVariableName.
static String VALUE_PROPERTY
          Bound property name for value.
 
Constructor Summary
Fact()
          Default Fact constructor.
Fact(String newLinguisticVariableName, FuzzySet newValue)
          Constructs a new Fact based on the name of a linguistic variable and a value described as fuzzy set.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list.
 void addVetoableChangeListener(VetoableChangeListener listener)
          Adds a VetoableChangeListener to the listener list.
 Object clone()
           
 boolean equals(Object obj)
           
 int getId()
          Returns the technical identifier (e.g. within a database).
 String getLinguisticVariableName()
          Returns the linguistic variable name of this fact.
 FuzzySet getValue()
          Returns the value of this fact which is represented by a fuzzy set.
 int hashCode()
           
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list.
 void removeVetoableChangeListener(VetoableChangeListener listener)
          Removes a VetoableChangeListener from the listener list.
 void setLinguisticVariableName(String newLinguisticVariableName)
          Sets the linguistic variable name of this fact.
 void setValue(FuzzySet newValue)
          Defines a new value for this fact.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LINGUISTIC_VARIABLE_NAME_PROPERTY

public static final String LINGUISTIC_VARIABLE_NAME_PROPERTY
Bound property name for linguisticVariableName.

See Also:
Constant Field Values

VALUE_PROPERTY

public static final String VALUE_PROPERTY
Bound property name for value.

See Also:
Constant Field Values
Constructor Detail

Fact

public Fact()
Default Fact constructor.


Fact

public Fact(String newLinguisticVariableName,
            FuzzySet newValue)
Constructs a new Fact based on the name of a linguistic variable and a value described as fuzzy set.

Parameters:
newLinguisticVariableName - The new value for the property.
newValue - The new value for the property.
Method Detail

getId

public int getId()
Returns the technical identifier (e.g. within a database).

Returns:
the ID

getLinguisticVariableName

public String getLinguisticVariableName()
Returns the linguistic variable name of this fact.

Returns:
the linguisticVariableName property
See Also:
setLinguisticVariableName(java.lang.String)

getValue

public FuzzySet getValue()
Returns the value of this fact which is represented by a fuzzy set.

Returns:
the value property
See Also:
setValue(net.sourceforge.fuzzyservices.beans.FuzzySet)

setLinguisticVariableName

public final void setLinguisticVariableName(String newLinguisticVariableName)
                                     throws PropertyVetoException
Sets the linguistic variable name of this fact.

Parameters:
newLinguisticVariableName - The new value for the property.
Throws:
PropertyVetoException - when the attempt to set the property is vetoed by a listener
See Also:
getLinguisticVariableName()

setValue

public final void setValue(FuzzySet newValue)
Defines a new value for this fact.

Parameters:
newValue - The new value for the property.
See Also:
getValue()

addVetoableChangeListener

public final void addVetoableChangeListener(VetoableChangeListener listener)
Adds a VetoableChangeListener to the listener list. The listener is registered for all properties.

Parameters:
listener - the VetoableChangeListener to be added

removeVetoableChangeListener

public final void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a VetoableChangeListener from the listener list. This removes a VetoableChangeListener that was registered for all properties.

Parameters:
listener - the VetoableChangeListener to be removed

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired in response to setting a bound property.

Parameters:
listener - the PropertyChangeListener to be added

removePropertyChangeListener

public final void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

Parameters:
listener - the PropertyChangeListener to be removed

clone

public Object clone()
Overrides:
clone in class Object

equals

public final boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2012 Fuzzy Services. All Rights Reserved.