public final class Property extends Object
PropertyManager
.Modifier and Type | Field and Description |
---|---|
static String |
FILE_SEPARATOR
Platform dependant file separator.
|
static String |
LINE_SEPARATOR
Platform dependent line separator.
|
static String |
PATH_SEPARATOR
Platform dependant path separator.
|
Constructor and Description |
---|
Property() |
Modifier and Type | Method and Description |
---|---|
static void |
addListener(PropertyListener listener)
Add a property listener
|
static void |
addListeners(PropertyListener[] listeners)
Add an array of property listeners
|
static boolean |
exists(String name)
Check if a property of the given name exists.
|
static String |
get(String name)
Get a property
|
static String |
get(String name,
String defaultValue)
Get a property
|
static String[] |
getArray(String name)
Get an array style property
|
static String[] |
getArray(String base,
String[] defaultValues)
Get an array style property
|
static PropertyGroup |
getGroup(String basename)
Get a property group for the given property base
|
static PropertyGroup |
getGroup(String basename,
int index)
Get a property group for the given property base at the given index
|
static String |
remove(String name)
Remove a property
|
static boolean |
removeListener(PropertyListener listener)
Remove a property listener
|
static String |
set(String name,
String value)
Set a property
|
public static String LINE_SEPARATOR
public static String FILE_SEPARATOR
public static String PATH_SEPARATOR
public static void addListener(PropertyListener listener)
listener
- Property listener to addpublic static void addListeners(PropertyListener[] listeners)
listeners
- Array of property listeners to addpublic static boolean removeListener(PropertyListener listener)
listener
- Property listener to removepublic static String set(String name, String value)
name
- Property namevalue
- Property valuepublic static String remove(String name)
name
- Property namepublic static String get(String name, String defaultValue)
name
- Property namedefaultValue
- Default property valuepublic static String get(String name)
name
- Property namepublic static String[] getArray(String base, String[] defaultValues)
base
- Base property namedefaultValues
- Default property valuespublic static String[] getArray(String name)
name
- Property namepublic static boolean exists(String name)
name
- Property namepublic static PropertyGroup getGroup(String basename)
basename
- Base property namepublic static PropertyGroup getGroup(String basename, int index)
basename
- Base property nameindex
- Array property indexCopyright © 2018 JBoss by Red Hat. All rights reserved.