@JsonData public class DefaultProfile extends java.lang.Object implements IProfile
Modifier and Type | Class and Description |
---|---|
static interface |
DefaultProfile.ProfileChangeListener
A listener that can be registered to be notified if a value in the profile changed
|
KEY_DESCRIPTION, KEY_NAME
Constructor and Description |
---|
DefaultProfile()
Default constructor with empty properties
|
DefaultProfile(IProfile sourceProfile)
Creates a new profile as copy of another profile
|
Modifier and Type | Method and Description |
---|---|
void |
addProfileChangeListener(DefaultProfile.ProfileChangeListener l)
Adds a listener to be notified if a profile value changed
|
boolean |
getBool(java.lang.String propertyName)
Returns the value of the specified
PDFCProperty as a boolean. |
boolean |
getBool(PDFCProperty<?> property)
Returns the value of the specified
PDFCProperty as a boolean. |
double |
getDouble(java.lang.String propertyName)
Returns the value of the specified
PDFCProperty as a double. |
double |
getDouble(PDFCProperty<?> property)
Returns the value of the specified
PDFCProperty as a double. |
int |
getInt(java.lang.String propertyName)
Returns the value of the specified
PDFCProperty as an int. |
int |
getInt(PDFCProperty<?> property)
Returns the value of the specified
PDFCProperty as an int. |
java.lang.Object |
getObject(java.lang.String propertyName)
Returns the value of the specified
PDFCProperty as an Object . |
java.lang.Object |
getObject(PDFCProperty<?> property)
Returns the value of the specified
PDFCProperty as an Object . |
java.util.Properties |
getProperties()
Returns set of properties defined in this configuration
|
java.lang.String |
getString(java.lang.String propertyName)
Returns the value of the specified
PDFCProperty as a String . |
java.lang.String |
getString(PDFCProperty<?> property)
Returns the value of the specified
PDFCProperty as a String . |
void |
putValue(PDFCProperty<?> property,
java.lang.String value)
Stores a property in the current configuration.
|
void |
putValue(java.lang.String propertyName,
java.lang.String value)
Stores a property in the current configuration.
|
void |
putValues(java.util.Properties values)
Stores all properties in the current configuration.
|
void |
removeProfileChangeListener(DefaultProfile.ProfileChangeListener l)
Removes a listener to be no more notified
|
public DefaultProfile()
public DefaultProfile(IProfile sourceProfile)
sourceProfile
- the config to copy from, must not be null
public void addProfileChangeListener(DefaultProfile.ProfileChangeListener l)
l
- the listener to be addedpublic void removeProfileChangeListener(DefaultProfile.ProfileChangeListener l)
l
- the listener to be removedpublic boolean getBool(java.lang.String propertyName)
PDFCProperty
as a boolean. If it was not specified in the
configuration file, the default value will be returned.public int getInt(java.lang.String propertyName)
PDFCProperty
as an int. If it was not specified in the configuration
file, the default value will be returned.public double getDouble(java.lang.String propertyName)
PDFCProperty
as a double. If it was not specified in the configuration
file, the default value will be returned.public java.lang.Object getObject(java.lang.String propertyName)
PDFCProperty
as an Object
. If it was not specified in the
configuration file, the default value will be returned.public java.lang.String getString(java.lang.String propertyName)
PDFCProperty
as a String
. If it was not specified in the
configuration file, the default value will be returned.public void putValue(PDFCProperty<?> property, java.lang.String value)
public void putValue(java.lang.String propertyName, java.lang.String value)
public void putValues(java.util.Properties values)
public java.util.Properties getProperties()
public java.lang.Object getObject(PDFCProperty<?> property)
PDFCProperty
as an Object
. If it was not specified in the
configuration file, the default value will be returned.public java.lang.String getString(PDFCProperty<?> property)
PDFCProperty
as a String
. If it was not specified in the
configuration file, the default value will be returned.public int getInt(PDFCProperty<?> property)
PDFCProperty
as an int. If it was not specified in the configuration
file, the default value will be returned.public double getDouble(PDFCProperty<?> property)
PDFCProperty
as a double. If it was not specified in the configuration
file, the default value will be returned.public boolean getBool(PDFCProperty<?> property)
PDFCProperty
as a boolean. If it was not specified in the
configuration file, the default value will be returned.Copyright © 2010-2022 by i-net software GmbH