net.sourceforge.fuzzyservices.beans
Class Antecedent

java.lang.Object
  extended by net.sourceforge.fuzzyservices.beans.Antecedent
All Implemented Interfaces:
VetoableChangeListener, Serializable, EventListener

public class Antecedent
extends Object
implements VetoableChangeListener, Serializable

This class represents an if-clause (antecedent) of a rule according to JavaBeans conventions.

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

Field Summary
static String COMPATIBILITY_OPERATOR_PROPERTY
          Bound property name for compatibilityOperator.
static String LINGUISTIC_TERM_NAME_PROPERTY
          Bound property name for linguisticTermName.
static String LINGUISTIC_VARIABLE_NAME_PROPERTY
          Bound property name for linguisticVariableName.
 
Constructor Summary
Antecedent()
          Default Antecedent constructor.
Antecedent(String newLinguisticVariableName, String newLinguisticTermName, Operator newCompatibilityOperator)
          Constructs an new antecedent with specified property values.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listener list.
 Object clone()
           
 boolean equals(Object obj)
           
 Operator getCompatibilityOperator()
          Returns the compatibility operator of this antecedent.
 String getLinguisticTermName()
          Returns the name of a linguistic term belongs to the antecedent.
 String getLinguisticVariableName()
          Returns the name of the linguistic variable belongs to this antecedent.
 int hashCode()
           
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list.
 void setCompatibilityOperator(Operator compatibilityOp)
          Sets the compatibility operator of this rule.
 void setLinguisticTermName(String lingTermName)
          Sets the name of linguistic term belongs to the antecedent.
 void setLinguisticVariableName(String lingVariableName)
          Sets the name of a linguistic variable belongs to the antecedent.
 String toString()
           
 void vetoableChange(PropertyChangeEvent evt)
          
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COMPATIBILITY_OPERATOR_PROPERTY

public static final String COMPATIBILITY_OPERATOR_PROPERTY
Bound property name for compatibilityOperator.

See Also:
Constant Field Values

LINGUISTIC_VARIABLE_NAME_PROPERTY

public static final String LINGUISTIC_VARIABLE_NAME_PROPERTY
Bound property name for linguisticVariableName.

See Also:
Constant Field Values

LINGUISTIC_TERM_NAME_PROPERTY

public static final String LINGUISTIC_TERM_NAME_PROPERTY
Bound property name for linguisticTermName.

See Also:
Constant Field Values
Constructor Detail

Antecedent

public Antecedent()
Default Antecedent constructor. This constructor sets a default compatibility operator specified in Antecedent, and registers itself as a vetoable change listener.

See Also:
Antecedent.getDefaultCompatibilityOperator()

Antecedent

public Antecedent(String newLinguisticVariableName,
                  String newLinguisticTermName,
                  Operator newCompatibilityOperator)
Constructs an new antecedent with specified property values.

Parameters:
newLinguisticVariableName - The new value for the property linguisticVariableName.
newLinguisticTermName - The new value for the property linguisticTermName.
newCompatibilityOperator - The new value for the property compatibilityOperator.
Method Detail

getCompatibilityOperator

public Operator getCompatibilityOperator()
Returns the compatibility operator of this antecedent.

Returns:
the compatibilityOperator property
See Also:
setCompatibilityOperator(net.sourceforge.fuzzyservices.beans.Operator)

getLinguisticTermName

public String getLinguisticTermName()
Returns the name of a linguistic term belongs to the antecedent.

Returns:
the linguisticTermName property
See Also:
setLinguisticTermName(java.lang.String)

getLinguisticVariableName

public String getLinguisticVariableName()
Returns the name of the linguistic variable belongs to this antecedent.

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

setCompatibilityOperator

public void setCompatibilityOperator(Operator compatibilityOp)
Sets the compatibility operator of this rule.

Parameters:
compatibilityOp - The new value for the property.
See Also:
getCompatibilityOperator()

setLinguisticTermName

public void setLinguisticTermName(String lingTermName)
Sets the name of linguistic term belongs to the antecedent.

Parameters:
lingTermName - The new value for the property.
See Also:
getLinguisticTermName()

setLinguisticVariableName

public void setLinguisticVariableName(String lingVariableName)
Sets the name of a linguistic variable belongs to the antecedent. Additionally, the linguisticTermName property is set to null.

Parameters:
lingVariableName - The new value for the property.
See Also:
getLinguisticVariableName()

addPropertyChangeListener

public 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 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

vetoableChange

public void vetoableChange(PropertyChangeEvent evt)
                    throws PropertyVetoException

Specified by:
vetoableChange in interface VetoableChangeListener
Throws:
PropertyVetoException

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.