net.sourceforge.fuzzyservices.beans
Class LinguisticTerm

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

public class LinguisticTerm
extends Object
implements Serializable

This class represents a term of a linguistic variable according to JavaBeans conventions.

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

Field Summary
static String NAME_PROPERTY
          Bound property name for name.
static String PROPERTY_FUZZY_SET
          Bound property name for fuzzySet.
 
Constructor Summary
LinguisticTerm()
          Default LinguisticTerm constructor.
LinguisticTerm(String newName, FuzzySet newFuzzySet)
          Constructs a new linguistic Term based on a name and a 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)
           
 FuzzySet getFuzzySet()
          Returns the fuzzy set of this linguistic term.
 int getId()
          Returns the technical identifier (e.g. within a database).
 String getName()
          Returns the name of this linguistic term.
 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 setFuzzySet(FuzzySet newFuzzySet)
          Sets a new fuzzy set.
 void setName(String newName)
          Sets the name of this linguistic term.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_PROPERTY

public static final String NAME_PROPERTY
Bound property name for name.

See Also:
Constant Field Values

PROPERTY_FUZZY_SET

public static final String PROPERTY_FUZZY_SET
Bound property name for fuzzySet.

See Also:
Constant Field Values
Constructor Detail

LinguisticTerm

public LinguisticTerm()
Default LinguisticTerm constructor.


LinguisticTerm

public LinguisticTerm(String newName,
                      FuzzySet newFuzzySet)
Constructs a new linguistic Term based on a name and a fuzzy set.

Parameters:
newName - The new value for the property.
newFuzzySet - The new value for the property.
Method Detail

getId

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

Returns:
the ID

getName

public final String getName()
Returns the name of this linguistic term.

Returns:
the name property
See Also:
setName(java.lang.String)

getFuzzySet

public final FuzzySet getFuzzySet()
Returns the fuzzy set of this linguistic term.

Returns:
the fuzzySet property
See Also:
setFuzzySet(net.sourceforge.fuzzyservices.beans.FuzzySet)

setFuzzySet

public final void setFuzzySet(FuzzySet newFuzzySet)
Sets a new fuzzy set.

Parameters:
newFuzzySet - The new value for the property.
See Also:
getFuzzySet()

setName

public final void setName(String newName)
                   throws PropertyVetoException
Sets the name of this linguistic term.

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

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.