Class FactorGroup
java.lang.Object
org.jdesktop.beans.AbstractBean
fr.ifremer.isisfish.simulator.sensitivity.Factor
fr.ifremer.isisfish.simulator.sensitivity.FactorGroup
- All Implemented Interfaces:
Serializable
,Cloneable
Factor group. Used for group screening.
A factor mixed can accept both discrete and continuous factors (used
for convenience : factor tree root).
A factor group without factors is untyped.
- Since:
- 3.4.0.0 Last update : $Date$ By : $Author$
- Version:
- $Revision$
- Author:
- chatellier
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Factor group is typed discrete/continuous.Factors collection.Fields inherited from class fr.ifremer.isisfish.simulator.sensitivity.Factor
cardinality, comment, domain, equationVariableName, identifier, name, nominalValue, path, value
-
Constructor Summary
ConstructorDescriptionFactorGroup
(String name) Init factor group.FactorGroup
(String name, boolean continuous) Init factor group. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(FactorGroupVisitor visitor) Accept a new visitor.void
addAllFactors
(List<Factor> allFactors) Add all checked factors.void
Check factor type and add it into factor collection.protected void
checkFactor
(Factor factor) Check factor type with other factor collection types.void
Clear all factor group sub factors.clone()
get
(int index) Convenient method to access specific factor.Get the factor value for displaying (for example in R).Return factor group domain depending of factor group type (discrete/continuous).Get groups factors.int
Returns the index of the first occurrence of the specified element in this group.boolean
Returntrue
if factor group is continuous.boolean
Returntrue
if factor group is discrete.void
Remove single factor.void
removeAll
(Collection<Factor> allFactors) Remove factors collection.void
setValueForIdentifier
(Object valueIdentifier) Set value for label.int
size()
Get factor list size.toString()
Methods inherited from class fr.ifremer.isisfish.simulator.sensitivity.Factor
accept, getCardinality, getComment, getEquationVariableName, getName, getNominalValue, getPath, getValue, setCardinality, setComment, setDomain, setEquationVariableName, setName, setNominalValue, setPath, setValue
Methods inherited from class org.jdesktop.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
Field Details
-
factors
Factors collection. -
continuous
protected boolean continuousFactor group is typed discrete/continuous. Continuous group can accept only continuous factors. Discrete group can accept both discrete and continuous factors.
-
-
Constructor Details
-
FactorGroup
Init factor group.- Parameters:
name
- group name
-
FactorGroup
Init factor group.- Parameters:
name
- group namecontinuous
- continuous domain
-
-
Method Details
-
addAllFactors
Add all checked factors.- Parameters:
allFactors
- factors to add
-
addFactor
Check factor type and add it into factor collection.- Parameters:
factor
-
-
checkFactor
Check factor type with other factor collection types.- Parameters:
factor
- factor to check- Throws:
IllegalArgumentException
- if factor doesn't match other factor type
-
remove
Remove single factor.- Parameters:
factor
- factor to remove
-
removeAll
Remove factors collection.- Parameters:
allFactors
- factors to remove
-
getFactors
Get groups factors.- Returns:
- unmodifiable factors list
-
clearFactors
public void clearFactors()Clear all factor group sub factors. -
get
Convenient method to access specific factor.- Parameters:
index
- index- Returns:
- factor at index
-
size
public int size()Get factor list size.- Returns:
- factor list size
-
indexOf
Returns the index of the first occurrence of the specified element in this group.- Parameters:
o
- element to search for- Returns:
- the index of the first occurrence of the specified element in this group, or -1 if this list does not contain the element
-
isDiscrete
public boolean isDiscrete()Returntrue
if factor group is discrete.- Returns:
true
if factor group is discrete
-
isContinuous
public boolean isContinuous()Returntrue
if factor group is continuous.- Returns:
true
if factor group is continuous
-
getDomain
Return factor group domain depending of factor group type (discrete/continuous). -
accept
Accept a new visitor.- Parameters:
visitor
-
-
toString
-
setValueForIdentifier
Set value for label.- Overrides:
setValueForIdentifier
in classFactor
- Parameters:
valueIdentifier
- new value identifier to get
-
getDisplayedValue
Get the factor value for displaying (for example in R).- Overrides:
getDisplayedValue
in classFactor
- Returns:
- the value
-
clone
-