|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.fuzzyservices.beans.Rule
public class Rule
This class represents a rule according to JavaBeans conventions.
Rule,
Serialized Form| Field Summary | |
|---|---|
static String |
AGGREGATION_OPERTAOR_PROPERTY
Bound property name for aggregationOperator. |
static String |
ANTECEDENTS_PROPERTY
Bound property name for antecedents. |
static String |
CERTAINTY_OPERATOR_PROPERTY
Bound property name for certaintyOperator. |
static String |
CERTAINTY_PROPERTY
Bound property name for certainty. |
static String |
CONSEQUENTS_PROPERTY
Bound property name for consequents. |
static String |
INFERENCE_OPERATOR_PROPERTY
Bound property name for inferenceOperator. |
| Constructor Summary | |
|---|---|
Rule()
Default Rule constructor. |
|
Rule(Antecedent[] newAntecedents,
Consequent[] newConsequents,
Operator newAggregationOperator,
Operator newInferenceOperator,
Operator newCertaintyOperator,
float newCertainty)
Constructs a new rule with specified property values. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
Object |
clone()
|
boolean |
equals(Object obj)
|
Operator |
getAggregationOperator()
Returns the aggregation operator of this rule. |
Antecedent[] |
getAntecedents()
Returns all antecedents of this rule. |
Antecedent |
getAntecedents(int index)
Gets the antecedent located at the specified index of this
rule. |
float |
getCertainty()
Returns the certainty of this rule. |
Operator |
getCertaintyOperator()
Returns the certainty operator of this rule. |
Consequent[] |
getConsequents()
Returns all consequents of this rule. |
Consequent |
getConsequents(int index)
Gets the consequent located at the specified index of this
rule. |
int |
getId()
Returns the technical identifier (e.g. within a database). |
Operator |
getInferenceOperator()
Returns the inference operator of this rule. |
int |
hashCode()
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
setAggregationOperator(Operator newAggregationOperator)
Sets the aggregation operator of this rule. |
void |
setAntecedents(Antecedent[] newAntecedents)
Defines new antecedents for this rule. |
void |
setAntecedents(int index,
Antecedent newAntecedents)
Replaces a antecedent of this rule. |
void |
setCertainty(float newCertainty)
Sets the certainty for this rule. |
void |
setCertaintyOperator(Operator newCertaintyOperator)
Sets the certainty operator of this rule. |
void |
setConsequents(Consequent[] newConsequents)
Defines new consequents for this rule. |
void |
setConsequents(int index,
Consequent newConsequents)
Replaces a consequent of this rule. |
void |
setInferenceOperator(Operator anInferenceOperator)
Sets the inference operator of this rule. |
String |
toString()
|
void |
vetoableChange(PropertyChangeEvent evt)
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ANTECEDENTS_PROPERTY
antecedents.
public static final String CONSEQUENTS_PROPERTY
consequents.
public static final String AGGREGATION_OPERTAOR_PROPERTY
aggregationOperator.
public static final String CERTAINTY_OPERATOR_PROPERTY
certaintyOperator.
public static final String INFERENCE_OPERATOR_PROPERTY
inferenceOperator.
public static final String CERTAINTY_PROPERTY
certainty.
| Constructor Detail |
|---|
public Rule()
Rule constructor. This constructor sets the
default operators specified in Rule, and
registers itself as vetoable change listeners.
Rule.getDefaultAggregationOperator(),
Rule.getDefaultCertaintyOperator(),
Rule.getDefaultInferenceOperator()
public Rule(Antecedent[] newAntecedents,
Consequent[] newConsequents,
Operator newAggregationOperator,
Operator newInferenceOperator,
Operator newCertaintyOperator,
float newCertainty)
newAntecedents - The new value for the property antecedents.newConsequents - The new value for the property consequents.newAggregationOperator - The new value for the property aggregationOperator.newInferenceOperator - The new value for the property inferenceOperator.newCertaintyOperator - The new value for the property certaintyOperator.newCertainty - The new value for the property certainty.| Method Detail |
|---|
public int getId()
public Antecedent[] getAntecedents()
antecedents propertysetAntecedents(net.sourceforge.fuzzyservices.beans.Antecedent[])public Antecedent getAntecedents(int index)
index of this
rule.
index - the position of the antecedent to be returned.
setAntecedents(net.sourceforge.fuzzyservices.beans.Antecedent[])public Consequent[] getConsequents()
consequents propertysetConsequents(net.sourceforge.fuzzyservices.beans.Consequent[])public Consequent getConsequents(int index)
index of this
rule.
index - the position of the consequent to be returned.
setConsequents(net.sourceforge.fuzzyservices.beans.Consequent[])public Operator getAggregationOperator()
aggregationOperator propertysetAggregationOperator(net.sourceforge.fuzzyservices.beans.Operator)public Operator getCertaintyOperator()
certaintyOperator propertysetCertaintyOperator(net.sourceforge.fuzzyservices.beans.Operator)public Operator getInferenceOperator()
inferenceOperator propertysetInferenceOperator(net.sourceforge.fuzzyservices.beans.Operator)public float getCertainty()
certainty propertysetCertainty(float)public void setAggregationOperator(Operator newAggregationOperator)
newAggregationOperator - The new value for the property.getAggregationOperator()public void setAntecedents(Antecedent[] newAntecedents)
newAntecedents - An array with antecedentsgetAntecedents(int)
public void setAntecedents(int index,
Antecedent newAntecedents)
index - The index value into the property array.newAntecedents - A new antecedent for this rulegetAntecedents(int)public void setCertainty(float newCertainty)
newCertainty - The new value for the property.getCertainty()public void setCertaintyOperator(Operator newCertaintyOperator)
newCertaintyOperator - The new value for the property.getCertaintyOperator()public void setConsequents(Consequent[] newConsequents)
newConsequents - An array with consequentsgetConsequents()
public void setConsequents(int index,
Consequent newConsequents)
index - The index value into the property array.newConsequents - A new consequent for this rulegetConsequents()public void setInferenceOperator(Operator anInferenceOperator)
anInferenceOperator - The new value for the property.getInferenceOperator()
public void vetoableChange(PropertyChangeEvent evt)
throws PropertyVetoException
vetoableChange in interface VetoableChangeListenerPropertyVetoExceptionpublic 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 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 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 Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||