- Alle implementierten Schnittstellen:
Serializable,Cloneable,Map<Object,Object>
This singleton contains all properties including those of modules that use
this one.
- Siehe auch:
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final booleanIs this program running under Windows?static final UtilPropertiesThe singleton.(Package privat) final FileThe file where the properties are stored.static final StringThe editor (depending on operating system) that is always available.Von Klasse geerbte Felder java.util.Properties
defaults -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung(Package privat) voidedit(boolean isInBatchPhase) Edit the properties file.booleangetBoolean(KeyAble keyAble) Get a boolean propertybooleangetBoolean(String key) Get a boolean propertydoubleGet a double property.doubleGet a double property.intGet an integer property.Get a message level property.longGet an long property.getProperty(KeyAble keyAble) Get a string property.(Package privat) FileGet the file where the properties are stored.getTimeDiff(KeyAble keyAble) Get a TimeDiff property.getTimeDiff(String key) Get a TimeDiff property.(Package privat) voidload()Load the properties from the properties file and check them.(Package privat) static StringTo create NLS enabled dialogsvoidPut a property by using a KeyAble (i. e. a Setting) as keyPut the property.voidputBoolean(KeyAble itemKeyAble, boolean value) Put a boolean property.voidputDefaults(KeyAble[] keyAbles) For every entry not read from property file replace missing values by defaults.booleanputIfEmpty(KeyAble keyAble, Object value) Put a property if it has no value.voidsetCheckPred(Predicate<PropertyEntry> checkPred) The predicate for checking the type and values is assigned in the start method and depends on the application.(Package privat) voidstore()Store the properties in the properties file.booleanverbose()There is a property for additional log output.Von Klasse geerbte Methoden java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
Felddetails
-
isWindows
public static final boolean isWindowsIs this program running under Windows? -
PROP
The singleton. -
sysEditor
The editor (depending on operating system) that is always available. -
propFile
The file where the properties are stored.
-
-
Methodendetails
-
nls
To create NLS enabled dialogs- Parameter:
msgTemplate- key with placeholders (%1$s, ...)msgParms- values for the placeholders- Gibt zurück:
- the text in natural language (e. g. en, de)
-
edit
void edit(boolean isInBatchPhase) Edit the properties file.- Parameter:
isInBatchPhase- in batch phase do not display the dialog
-
getBoolean
Get a boolean property- Parameter:
keyAble- used as key of the property- Gibt zurück:
- the property as a boolean, false if it does not exist
-
getBoolean
Get a boolean property- Parameter:
key- (string) of the property- Gibt zurück:
- the property as a boolean, false if it does not exist
-
getDouble
Get a double property.- Parameter:
keyAble- used as key of the property- Gibt zurück:
- the property as a double
- Löst aus:
UtilException- if the value does not exist or is not a double
-
getDouble
Get a double property.- Parameter:
key- of the property- Gibt zurück:
- the property as a double
- Löst aus:
UtilException- if the value does not exist or is not a double
-
getTimeDiff
Get a TimeDiff property.- Parameter:
keyAble- as key of the property- Gibt zurück:
- the property as a double
- Löst aus:
UtilException- if the value does not exist or is not a double with units (ms, s, ...)
-
getTimeDiff
Get a TimeDiff property.- Parameter:
key- of the property- Gibt zurück:
- the property as a double
- Löst aus:
UtilException- if the value does not exist or is not a double with units (ms, s, ...)
-
getInt
Get an integer property.- Parameter:
keyAble- used as key of the property- Gibt zurück:
- the property as a double
- Löst aus:
UtilException- if the value does not exist or is not an integer
-
getLevel
Get a message level property.- Parameter:
keyAble- used as key of the property- Gibt zurück:
- the property as a double
- Löst aus:
UtilException- if the value does not exist or is not an integer
-
getLong
Get an long property.- Parameter:
keyAble- used as key of the property- Gibt zurück:
- the property as a long
- Löst aus:
UtilException- if the value does not exist or is not an integer
-
getProperty
Get a string property.- Parameter:
keyAble- used as key of the property- Gibt zurück:
- the property as a string
-
getPropFile
File getPropFile()Get the file where the properties are stored.- Gibt zurück:
- the properties file
-
load
void load()Load the properties from the properties file and check them. -
put
Put a property by using a KeyAble (i. e. a Setting) as key- Parameter:
keyAble- used as keyvalue- the property value
-
put
Put the property. If it has been changed, mark that it must be stored. -
putBoolean
Put a boolean property.- Parameter:
itemKeyAble- a setting used as keyvalue- the boolean value
-
putDefaults
For every entry not read from property file replace missing values by defaults. Ignore KeyAbles with default=null.- Parameter:
keyAbles- the array of settings
-
putIfEmpty
Put a property if it has no value.- Parameter:
keyAble- the Setting (enum) of the property. The Setting is the property's name.value- the value which may have type String, Boolean, or Double.- Gibt zurück:
- if the value has been changed.
-
setCheckPred
The predicate for checking the type and values is assigned in the start method and depends on the application.- Parameter:
checkPred- predicate function to be assigned
-
store
void store()Store the properties in the properties file. -
verbose
public boolean verbose()There is a property for additional log output.- Gibt zurück:
- true if more log output is wanted.
-