infosapient.system
Class FzyBooleanAttribute
java.lang.Object
|
+--infosapient.system.ObservableImpl
|
+--infosapient.system.FzySystemComponent
|
+--infosapient.system.FzyClauseComponent
|
+--infosapient.system.FzyAttribute
|
+--infosapient.system.FzyBooleanAttribute
- public class FzyBooleanAttribute
- extends FzyAttribute
Class FzyBooleanAttribute is a convienence class. It only possesses two sets {"false", "true"}
It was written to circumvent the need to write out the set parameters for false and true.
Change log:
Chris Leising 1/25/2000: Added new constructor FzyBooleanAttribute(String, String, String, FzyKnowledgebase, int)
- Version:
- $Revision: 1.1.1.1 $
- See Also:
- Serialized Form
Method Summary |
private int |
_removeFSet(FzySet fs)
Used for changing the set types from sinusodial to triangle or
triangle to sinusoidal. |
boolean |
addSet(FzySet aSet)
Add a unique FzySet to this FzyAttribute. |
boolean |
addSet(FzySet aSet,
int index)
Add a set at a specific index. |
private void |
initialize(int type)
|
void |
printOn(java.io.Writer outWriter,
int nTabs)
Used to represent this attribute with its sets when saving knowledgebase |
FzyBooleanAttribute |
reInitialize(int type)
Remove and replace existing true and false sets with the new set types. |
int |
removeFSet(FzySet aSet)
Remove a fuzzy set and return the index that the set was found at. |
Methods inherited from class infosapient.system.FzyAttribute |
ask,
clone,
containsSet,
containsSetNamed,
containsValue,
getCurrentDomainValue,
getDescription,
getDOMForCollection,
getInitialValue,
getKB,
getPrompt,
getSetNamed,
getSetNames,
getSolution,
getSolutionDOM,
getSolutionSet,
hasSolution,
removeAllSets,
reset,
setChanged,
setCurrentDomainValue,
setDescription,
setInitialValue,
setPrompt,
sets,
setSolution,
toString,
toXML,
update |
Methods inherited from class infosapient.system.FzySystemComponent |
addPropertyChangeListener,
addVetoableChangeListener,
equals,
getID,
getName,
getPropertyChangeSupport,
getVetoableChangeSupport,
hashCode,
removePropertyChangeListener,
removeVetoableChangeListener,
setID,
setName |
Methods inherited from class java.lang.Object |
,
finalize,
getClass,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
CLASSVERSION_IDENTIFIER
private static java.lang.String CLASSVERSION_IDENTIFIER
SINUSOIDAL
public static final int SINUSOIDAL
TRIANGLE
public static final int TRIANGLE
falseSet
FzySet falseSet
trueSet
FzySet trueSet
found
boolean found
FzyBooleanAttribute
public FzyBooleanAttribute(FzyKnowledgebase kb)
FzyBooleanAttribute
public FzyBooleanAttribute(java.lang.String name,
FzyKnowledgebase kb)
FzyBooleanAttribute
public FzyBooleanAttribute(java.lang.String name,
FzyKnowledgebase kb,
int type)
throws FzySystemException
FzyBooleanAttribute
public FzyBooleanAttribute(java.lang.String name,
java.lang.String desc,
java.lang.String prompt,
FzyKnowledgebase kb,
int type)
throws FzySystemException
- This constructor was added in order to set the prompt and description as in the super class FzyAttribute
Author: Chris Leising
Created: 01/25/2000
_removeFSet
private int _removeFSet(FzySet fs)
- Used for changing the set types from sinusodial to triangle or
triangle to sinusoidal.
addSet
public boolean addSet(FzySet aSet)
- Description copied from class: FzyAttribute
- Add a unique FzySet to this FzyAttribute.
- Overrides:
- addSet in class FzyAttribute
- Tags copied from class: FzyAttribute
- Parameters:
FzySet
- the set to be added to the attribute.- Returns:
- boolean true if the set was added.
addSet
public boolean addSet(FzySet aSet,
int index)
- Description copied from class: FzyAttribute
- Add a set at a specific index.
- Overrides:
- addSet in class FzyAttribute
- Tags copied from class: FzyAttribute
- Parameters:
FzySet
- the set to be added.int
- the index that the set is to be placed at.- Returns:
- boolean true if the set was added.
initialize
private void initialize(int type)
printOn
public void printOn(java.io.Writer outWriter,
int nTabs)
throws java.io.IOException
- Used to represent this attribute with its sets when saving knowledgebase
- Overrides:
- printOn in class FzyAttribute
- Parameters:
java.io.Writer
- - the outputWriter to useint
- - number of tabs to space over for this attribute.
reInitialize
public FzyBooleanAttribute reInitialize(int type)
throws java.lang.IllegalArgumentException
- Remove and replace existing true and false sets with the new set types.
- Parameters:
type
- int - the setType being described (SINUSOIDAL or TRIANGLE)- Throws:
- java.lang.IllegalArgumentException - if the settype was not provided or out of range (!= 0, 1).
removeFSet
public int removeFSet(FzySet aSet)
- Description copied from class: FzyAttribute
- Remove a fuzzy set and return the index that the set was found at.
This return value can be used to insert a new set at the same index.
If -1, indicates that the set was not found within this attribute.
- Overrides:
- removeFSet in class FzyAttribute
- Tags copied from class: FzyAttribute
- Parameters:
FzySet
- The FzySet to be removed.
Copyright (c) 2001, Workplace Performance Tools, All Rights Reserved