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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanFactor 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
ConstructorsConstructorDescriptionFactorGroup(String name) Init factor group.FactorGroup(String name, boolean continuous) Init factor group. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(FactorGroupVisitor visitor) Accept a new visitor.voidaddAllFactors(List<Factor> allFactors) Add all checked factors.voidCheck factor type and add it into factor collection.protected voidcheckFactor(Factor factor) Check factor type with other factor collection types.voidClear 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.intReturns the index of the first occurrence of the specified element in this group.booleanReturntrueif factor group is continuous.booleanReturntrueif factor group is discrete.voidRemove single factor.voidremoveAll(Collection<Factor> allFactors) Remove factors collection.voidsetValueForIdentifier(Object valueIdentifier) Set value for label.intsize()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, setValueMethods 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()Returntrueif factor group is discrete.- Returns:
trueif factor group is discrete
-
isContinuous
public boolean isContinuous()Returntrueif factor group is continuous.- Returns:
trueif 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:
setValueForIdentifierin classFactor- Parameters:
valueIdentifier- new value identifier to get
-
getDisplayedValue
Get the factor value for displaying (for example in R).- Overrides:
getDisplayedValuein classFactor- Returns:
- the value
-
clone
-