|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.fuzzyservices.beans.FactBase
public class FactBase
This class represents a fact base according to JavaBeans conventions.
FactBase,
Serialized Form| Field Summary | |
|---|---|
static String |
FACTS_PROPERTY
Bound property name for facts. |
static String |
NAME_PROPERTY
Bound property name for name. |
| Constructor Summary | |
|---|---|
FactBase()
Default FactBase constructor. |
|
FactBase(String newName)
Constructs a new fact base with given name. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
Object |
clone()
|
boolean |
equals(Object obj)
|
Fact[] |
getFacts()
Returns all facts of this fact base. |
Fact |
getFacts(int index)
Gets the fact located at the specified index of this fact
base. |
int |
getId()
Returns the technical identifier (e.g. within a database). |
String |
getName()
Returns the name of this fact base. |
int |
hashCode()
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
setFacts(Fact[] newFacts)
Fills the fact base with facts. |
void |
setFacts(int index,
Fact newFacts)
Replaces the fact at the position index of the fact base. |
void |
setName(String newName)
Sets the name of this fact base. |
String |
toString()
|
String |
toString(boolean withFacts)
Returns a textual representation of the fact base |
void |
vetoableChange(PropertyChangeEvent evt)
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String NAME_PROPERTY
name.
public static final String FACTS_PROPERTY
facts.
| Constructor Detail |
|---|
public FactBase()
FactBase constructor.
public FactBase(String newName)
newName - The new value for the property.| Method Detail |
|---|
public int getId()
public String getName()
name propertysetName(java.lang.String)public Fact[] getFacts()
facts propertysetFacts(Fact[])public Fact getFacts(int index)
index of this fact
base.
index - the position of the fact to be returned.
setFacts(Fact[])public void setName(String newName)
newName - The new value for the property.getName()
public void setFacts(Fact[] newFacts)
throws IllegalArgumentException
newFacts - An array with facts.
IllegalArgumentException - if a linguistic variable of a fact
is not defined
or if at least two facts relates to one linguistic variablegetFacts()
public void setFacts(int index,
Fact newFacts)
throws IllegalArgumentException,
ArrayIndexOutOfBoundsException
index of the fact base.
index - The index value into the property array.newFacts - The new fact for the fact base.
ArrayIndexOutOfBoundsException - if index is an
invalid position
IllegalArgumentException - if a linguistic variable of a fact
is not defined
or if at least two facts relates to one linguistic variablegetFacts()
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 Objectpublic String toString(boolean withFacts)
withFacts - true if all fact definitions are also returned,
false otherwise.
Fact.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||