Package pulse.properties
Class Flag
- java.lang.Object
-
- pulse.properties.Flag
-
- All Implemented Interfaces:
Serializable,Property
public class Flag extends Object implements Property
AFlagis aPropertythat has atyperepresented by aNumericPropertyKeyword, aboolean value, and aStringwith a short abbreviation describing the type of this flag (this is usually defined by the correspondingNumericProperty).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Flag(Flag f)Flag(NumericPropertyKeyword type)Creates aFlagwith the typetype.Flag(NumericPropertyKeyword type, boolean flag)Flag(NumericProperty property, boolean value)Creates aFlagwith the following pre-specified parameters: typetype, short descriptionabbreviations, andvalue.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringabbreviation(boolean addHtmlTags)static List<Flag>allFlags()List of all possibleFlags that can be used in finding the reverse solution of the heat conduction problems.booleanattemptUpdate(Object value)static List<NumericPropertyKeyword>convert(List<Flag> flags)A static method for converting enabled flags to aListofNumericPropertyKeywords.Flagderive(boolean value)Creates a newFlagobject based on thisFlag, but with a differentvalue.booleanequals(Object o)StringgetDescriptor(boolean addHtmlTags)Creates a short description for the GUI.NumericPropertyKeywordgetType()Returns the type of thisFlag.ObjectgetValue()The value for thisPropertyis aboolean.Objectidentifier()static List<Flag>selectActive(List<Flag> flags)voidsetAbbreviation(String abbreviation)voidsetValue(boolean value)StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface pulse.properties.Property
formattedOutput
-
-
-
-
Constructor Detail
-
Flag
public Flag(NumericPropertyKeyword type)
Creates aFlagwith the typetype. The defaultvalueis set tofalse.- Parameters:
type- theNumericPropertyKeywordassociated with thisFlag
-
Flag
public Flag(Flag f)
-
Flag
public Flag(NumericPropertyKeyword type, boolean flag)
-
Flag
public Flag(NumericProperty property, boolean value)
Creates aFlagwith the following pre-specified parameters: typetype, short descriptionabbreviations, andvalue.- Parameters:
property- theNumericPropertyparameter containing theNumericPropertyKeywordidentifiervalue- thebooleanvalue of thisflag
-
-
Method Detail
-
convert
public static List<NumericPropertyKeyword> convert(List<Flag> flags)
A static method for converting enabled flags to aListofNumericPropertyKeywords. Each keyword in this list corresponds to an enabled flag in theflagsList.- Parameters:
flags- the list of flags that needs to be analysed- Returns:
- a list of
NumericPropertyKeywords corresponding to enabledflags.
-
allFlags
public static List<Flag> allFlags()
List of all possibleFlags that can be used in finding the reverse solution of the heat conduction problems. Includes all flags that correspond toNumericProperties satisfyingp.isOptimisable() = true. The default value of the flag is set top.isDefaultSearchVariable()-- based on the information contained in theNumericProperty.xmlfile.- Returns:
- a
Listof all possibleFlags
-
getType
public NumericPropertyKeyword getType()
Returns the type of thisFlag.- Returns:
- a
NumericPropertyKeywordrepresenting the type of thisFlag.
-
derive
public Flag derive(boolean value)
Creates a newFlagobject based on thisFlag, but with a differentvalue.- Parameters:
value- eithertrueorfalse- Returns:
- a
Flagthat replicates thetypeandabbreviationof thisFlag, but sets a newvalue
-
getDescriptor
public String getDescriptor(boolean addHtmlTags)
Creates a short description for the GUI.- Specified by:
getDescriptorin interfaceProperty- Parameters:
addHtmlTags- iftrue, adds the 'html' tags at both ends of the descriptorString.- Returns:
- a
String, with or without 'html' tags, describing thisProperty
-
getValue
public Object getValue()
The value for thisPropertyis aboolean.
-
setValue
public void setValue(boolean value)
-
abbreviation
public String abbreviation(boolean addHtmlTags)
-
setAbbreviation
public void setAbbreviation(String abbreviation)
-
identifier
public Object identifier()
- Specified by:
identifierin interfaceProperty
-
attemptUpdate
public boolean attemptUpdate(Object value)
- Specified by:
attemptUpdatein interfaceProperty
-
-