|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.agena.minerva.model.extendedbn.ExtendedState
public class ExtendedState
An ExtendedState corresponds to a state on a node in an underlying BN. It adds extra information to the state such as extended name information.
Field Summary |
---|
Fields inherited from interface uk.co.agena.minerva.util.model.Writable |
---|
FIELD_SEPARATOR |
Constructor Summary | |
---|---|
ExtendedState()
Default constructor. |
|
ExtendedState(int connStateIndex,
NameDescription name,
boolean visible)
Creates an ExtendedState with the supplied connected state index, name, and visibility. |
|
ExtendedState(int connStateIndex,
NameDescription name,
double numericalValue,
Range range,
boolean visible)
Creates an ExtendedState with the supplied connected state index, name, numerical value, Range and visibility. |
Method Summary | |
---|---|
void |
addExtendedStateListener(ExtendedStateListener enl)
Adds an object interested in ExtendedStateEvents to the List of ExtendedStateListeners (actually held by an internal ExtendedStateEventGenerator). |
static ExtendedState |
createContinuousIntervalState(double lower,
double upper)
Creates a new continuous interval state with the supplied lower and upper bounds. |
static ExtendedState |
createDiscreteRealState(double numericalValue)
Creates a new discrete real state with the supplied name and description. |
static ExtendedState |
createIntegerIntervalState(int lower,
int upper)
Creates a new integer interval state with the supplied lower and upper bounds. |
static ExtendedState |
createLabelledState(java.lang.String name,
java.lang.String description)
Creates a new labelled state with the supplied name and description. |
int |
getConnStateIndex()
Returns the index of the underlying state to which this ExtendedState is connected. |
int |
getId()
Returns the unique ID of the ExtendedState. |
NameDescription |
getName()
Returns the name of the ExtendedState. |
double |
getNumericalValue()
Returns the point value with which this ExtendedState is associated. |
Range |
getRange()
Returns the Range with which this ExtendedState is associated. |
double |
getVersion()
Returns the version of the class. |
boolean |
getVisible()
Returns whether the ExtendedState is visible. |
int |
read(java.util.List strings,
int currentLineNumber)
|
void |
removeExtendedStateListener(ExtendedStateListener enl)
Removes an object no longer interested in ExtendedStateEvents from the List of ExtendedStateListeners (actually held by an internal ExtendedStateEventGenerator). |
void |
setConnStateIndex(int connStateIndex)
Sets the index of the underlying state to which this ExtendedState is connected. |
void |
setId(int id)
Sets the unique ID of the ExtendedState to the ID specified. |
void |
setName(NameDescription name)
Sets the name of the ExtendedState to the name specified. |
void |
setNumericalValue(double numericalValue)
Sets the point value with which this ExtendedState is associated. |
void |
setRange(Range range)
Sets the Range with which this ExtendedState is associated. |
void |
setVersion(double version)
Sets the version number of the class. |
void |
setVisible(boolean visible)
Sets whether the ExtendedState is visible. |
java.util.List |
write()
Writes the object in question to a List of Strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExtendedState()
public ExtendedState(int connStateIndex, NameDescription name, double numericalValue, Range range, boolean visible)
connStateIndex
- the index of the corresponding state in the underlying BNname
- the name of the ExtendedStatenumericalValue
- the point value to which the ExtendedState correspondsrange
- the Range to which the ExtendedState correspondsvisible
- whether the ExtendedState is visiblepublic ExtendedState(int connStateIndex, NameDescription name, boolean visible)
connStateIndex
- the index of the corresponding state in the underlying BNname
- the name of the ExtendedStatevisible
- whether the ExtendedState is visibleMethod Detail |
---|
public static ExtendedState createContinuousIntervalState(double lower, double upper) throws MinervaRangeException
lower
- the lower bound of the stateupper
- the upper bound of the state
MinervaRangeException
- if upper < lowerpublic static ExtendedState createIntegerIntervalState(int lower, int upper) throws MinervaRangeException
lower
- the lower bound of the stateupper
- the upper bound of the state
MinervaRangeException
- if upper < lowerpublic static ExtendedState createLabelledState(java.lang.String name, java.lang.String description)
name
- the name of the statedescription
- the description of the state
MinervaRangeException
- if upper < lowerpublic static ExtendedState createDiscreteRealState(double numericalValue)
numericalValue
- the numerical value of the state
public int getId()
getId
in interface Identifiable
public void setId(int id)
id
- the new ID for the ExtendedStatepublic double getVersion()
Writable
getVersion
in interface Writable
public void setVersion(double version)
Writable
setVersion
in interface Writable
version
- the version numberpublic int getConnStateIndex()
public void setConnStateIndex(int connStateIndex)
connStateIndex
- the new indexpublic NameDescription getName()
getName
in interface Nameable
public void setName(NameDescription name)
setName
in interface Nameable
name
- the new name for the ExtendedStatepublic boolean getVisible()
public void setVisible(boolean visible)
visible
- whether the ExtendedState is visiblepublic double getNumericalValue()
public void setNumericalValue(double numericalValue)
numericalValue
- the point valuepublic Range getRange()
public void setRange(Range range)
range
- the Rangepublic void addExtendedStateListener(ExtendedStateListener enl)
enl
- the interested ExtendedStateListenerpublic void removeExtendedStateListener(ExtendedStateListener enl)
enl
- the interested ExtendedStateListenerpublic java.util.List write() throws MinervaReadWriteException
Writable
write
in interface Writable
MinervaReadWriteException
- if therepublic int read(java.util.List strings, int currentLineNumber) throws MinervaReadWriteException
read
in interface Writable
MinervaReadWriteException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |