net.sourceforge.fuzzyservices.beans
Class Operator

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

public class Operator
extends Object
implements Serializable

This class represents a fuzzy operator according to JavaBeans conventions.

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

Field Summary
static String PARAMETER_PROPERTY
          Bound property name for parameter.
static String TYPE_PROPERTY
          Bound property name for type.
static String VALID_S_NORM_PROPERTY
          Bound property name for validSNorm.
static String VALID_T_NORM_PROPERTY
          Bound property name for validTNorm.
 
Constructor Summary
Operator()
          Default Operator constructor.
Operator(String newType, float newParameter)
          Constructs a new operator with specified property values.
 
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()
           
 FuzzySet combine(FuzzySet fs1, FuzzySet fs2)
          Combines two fuzzy sets appropiated the operator type.
 boolean equals(Object obj)
           
 float getParameter()
          Returns the parameter of this operator.
 String getType()
          Returns the type of this operator.
 int hashCode()
           
 boolean isValidSNorm()
          Indicates whether an operator fullfils the s-norm.
 boolean isValidTNorm()
          Indicates whether an operator fullfils the t-norm.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list.
 void removeVetoableChangeListener(VetoableChangeListener listener)
          Removes a VetoableChangeListener from the listener list.
 void setParameter(float param)
          Sets the parameter of this operator.
 void setType(String newType)
          Sets the operator type.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_PROPERTY

public static final String TYPE_PROPERTY
Bound property name for type.

See Also:
Constant Field Values

PARAMETER_PROPERTY

public static final String PARAMETER_PROPERTY
Bound property name for parameter.

See Also:
Constant Field Values

VALID_S_NORM_PROPERTY

public static final String VALID_S_NORM_PROPERTY
Bound property name for validSNorm.

See Also:
Constant Field Values

VALID_T_NORM_PROPERTY

public static final String VALID_T_NORM_PROPERTY
Bound property name for validTNorm.

See Also:
Constant Field Values
Constructor Detail

Operator

public Operator()
Default Operator constructor. The operator type is NOT defined!


Operator

public Operator(String newType,
                float newParameter)
Constructs a new operator with specified property values.

Parameters:
newType - The new value for the property type.
newParameter - The new value for the property parameter.
Method Detail

getType

public String getType()
Returns the type of this operator.

Returns:
the type property
See Also:
setType(java.lang.String)

setType

public void setType(String newType)
             throws PropertyVetoException
Sets the operator type. If the new type requires a parameter, the default value is set.

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

getParameter

public float getParameter()
Returns the parameter of this operator.

Returns:
the parameter property
See Also:
setParameter(float)

setParameter

public void setParameter(float param)
                  throws PropertyVetoException
Sets the parameter of this operator.

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

combine

public FuzzySet combine(FuzzySet fs1,
                        FuzzySet fs2)
Combines two fuzzy sets appropiated the operator type.

Parameters:
fs1 - The first fuzzy set as operand
fs2 - The second fuzzy set as operand
Returns:
The result of this fuzzy operation

isValidSNorm

public boolean isValidSNorm()
Indicates whether an operator fullfils the s-norm.

Returns:
true if this operator fullfils the s-norm, false otherwise.

isValidTNorm

public boolean isValidTNorm()
Indicates whether an operator fullfils the t-norm.

Returns:
true if this operator fullfils the t-norm, false otherwise.

addVetoableChangeListener

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

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.