public class CustomPropertyProvider extends java.lang.Object implements ICustomPropertyProvider
| Constructor and Description |
|---|
CustomPropertyProvider() |
CustomPropertyProvider(ICustomPropertyProvider propertyProviderToBeCopied)
Copy Constructor for copying instances of CustomPropertyProviders.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBoolValue(java.lang.String propertyName)
Gets the boolean value of the custom property with the provided name.
|
boolean |
getBoolValue(java.lang.String propertyName,
boolean defaultValue)
Gets the boolean value of the custom property with the provided name.
|
byte |
getByteValue(java.lang.String propertyName)
Gets the byte value of the custom property with the provided name.
|
byte |
getByteValue(java.lang.String propertyName,
byte defaultValue)
Gets the byte value of the custom property with the provided name.
|
java.awt.Color |
getColorValue(java.lang.String propertyName)
Gets the color value of the custom property with the provided name.
|
java.awt.Color |
getColorValue(java.lang.String propertyName,
java.awt.Color defaultValue)
Gets the color value of the custom property with the provided name.
|
double |
getDoubleValue(java.lang.String propertyName)
Gets the double value of the custom property with the provided name.
|
double |
getDoubleValue(java.lang.String propertyName,
double defaultValue)
Gets the double value of the custom property with the provided name.
|
<T extends java.lang.Enum<T>> |
getEnumValue(java.lang.String propertyName,
java.lang.Class<T> enumType)
Gets the enum value of the custom property with the provided name.
|
<T extends java.lang.Enum<T>> |
getEnumValue(java.lang.String propertyName,
java.lang.Class<T> enumType,
T defaultValue)
Gets the enum value of the custom property with the provided name.
|
java.net.URL |
getFileValue(java.lang.String propertyName)
Gets the file value of the custom property with the provided name.
|
java.net.URL |
getFileValue(java.lang.String propertyName,
java.net.URL defaultValue)
Gets the file value of the custom property with the provided name.
|
float |
getFloatValue(java.lang.String propertyName)
Gets the float value of the custom property with the provided name.
|
float |
getFloatValue(java.lang.String propertyName,
float defaultValue)
Gets the float value of the custom property with the provided name.
|
int |
getIntValue(java.lang.String propertyName)
Gets the int value of the custom property with the provided name.
|
int |
getIntValue(java.lang.String propertyName,
int defaultValue)
Gets the int value of the custom property with the provided name.
|
long |
getLongValue(java.lang.String propertyName,
long defaultValue)
Gets the long value of the custom property with the provided name.
|
java.util.Map<java.lang.String,ICustomProperty> |
getProperties()
Returns a
Map view of the custom properties for this ICustomPropertyProvider. |
ICustomProperty |
getProperty(java.lang.String propertyName) |
short |
getShortValue(java.lang.String propertyName)
Gets the short value of the custom property with the provided name.
|
short |
getShortValue(java.lang.String propertyName,
short defaultValue)
Gets the short value of the custom property with the provided name.
|
java.lang.String |
getStringValue(java.lang.String propertyName)
Gets the string value of the custom property with the provided name.
|
java.lang.String |
getStringValue(java.lang.String propertyName,
java.lang.String defaultValue)
Gets the string value of the custom property with the provided name.
|
java.lang.String |
getTypeOfProperty(java.lang.String propertyName) |
boolean |
hasCustomProperty(java.lang.String propertyName)
Checks if a custom property with the given name is present.
|
void |
removeProperty(java.lang.String propertyName) |
void |
setProperties(java.util.Map<java.lang.String,ICustomProperty> props)
Sets all of the custom properties on this object to the provided values.
|
void |
setTypeOfProperty(java.lang.String propertyName,
java.lang.String type) |
void |
setValue(java.lang.String propertyName,
boolean value)
Sets the value for the custom property with the given name to the given boolean.
|
void |
setValue(java.lang.String propertyName,
byte value)
Sets the value for the custom property with the given name to the given byte.
|
void |
setValue(java.lang.String propertyName,
java.awt.Color value)
Sets the value for the custom property with the given name to the given color.
|
void |
setValue(java.lang.String propertyName,
double value)
Sets the value for the custom property with the given name to the given double.
|
void |
setValue(java.lang.String propertyName,
java.lang.Enum<?> value)
Sets the value for the custom property with the given name to the given enum.
|
void |
setValue(java.lang.String propertyName,
float value)
Sets the value for the custom property with the given name to the given float.
|
void |
setValue(java.lang.String propertyName,
ICustomProperty value) |
void |
setValue(java.lang.String propertyName,
int value)
Sets the value for the custom property with the given name to the given int.
|
void |
setValue(java.lang.String propertyName,
long value)
Sets the value for the custom property with the given name to the given long.
|
void |
setValue(java.lang.String propertyName,
short value)
Sets the value for the custom property with the given name to the given short.
|
void |
setValue(java.lang.String propertyName,
java.lang.String value)
Sets the value for the custom property with the given name to the given string.
|
void |
setValue(java.lang.String propertyName,
java.net.URL value)
Sets the value for the custom property with the given name to the given file.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLongValuepublic CustomPropertyProvider()
public CustomPropertyProvider(ICustomPropertyProvider propertyProviderToBeCopied)
propertyProviderToBeCopied - the PropertyProvider we want to copypublic java.util.Map<java.lang.String,ICustomProperty> getProperties()
ICustomPropertyProviderMap view of the custom properties for this ICustomPropertyProvider.getProperties in interface ICustomPropertyProviderMap view of the custom properties for this ICustomPropertyProviderpublic boolean hasCustomProperty(java.lang.String propertyName)
ICustomPropertyProviderhasCustomProperty in interface ICustomPropertyProviderpropertyName - the name of the custom propertypublic java.lang.String getTypeOfProperty(java.lang.String propertyName)
getTypeOfProperty in interface ICustomPropertyProviderpublic void setTypeOfProperty(java.lang.String propertyName,
java.lang.String type)
setTypeOfProperty in interface ICustomPropertyProviderpublic ICustomProperty getProperty(java.lang.String propertyName)
getProperty in interface ICustomPropertyProviderpublic void setValue(java.lang.String propertyName,
ICustomProperty value)
setValue in interface ICustomPropertyProviderpublic java.lang.String getStringValue(java.lang.String propertyName)
ICustomPropertyProvidergetStringValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertypublic java.lang.String getStringValue(java.lang.String propertyName,
java.lang.String defaultValue)
ICustomPropertyProvidergetStringValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public int getIntValue(java.lang.String propertyName)
ICustomPropertyProvidergetIntValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertypublic int getIntValue(java.lang.String propertyName,
int defaultValue)
ICustomPropertyProvidergetIntValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public long getLongValue(java.lang.String propertyName,
long defaultValue)
ICustomPropertyProvidergetLongValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public short getShortValue(java.lang.String propertyName)
ICustomPropertyProvidergetShortValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertypublic short getShortValue(java.lang.String propertyName,
short defaultValue)
ICustomPropertyProvidergetShortValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public byte getByteValue(java.lang.String propertyName)
ICustomPropertyProvidergetByteValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertypublic byte getByteValue(java.lang.String propertyName,
byte defaultValue)
ICustomPropertyProvidergetByteValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public boolean getBoolValue(java.lang.String propertyName)
ICustomPropertyProvidergetBoolValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertypublic boolean getBoolValue(java.lang.String propertyName,
boolean defaultValue)
ICustomPropertyProvidergetBoolValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public float getFloatValue(java.lang.String propertyName)
ICustomPropertyProvidergetFloatValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertypublic float getFloatValue(java.lang.String propertyName,
float defaultValue)
ICustomPropertyProvidergetFloatValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public double getDoubleValue(java.lang.String propertyName)
ICustomPropertyProvidergetDoubleValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertypublic double getDoubleValue(java.lang.String propertyName,
double defaultValue)
ICustomPropertyProvidergetDoubleValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public java.awt.Color getColorValue(java.lang.String propertyName)
ICustomPropertyProvidergetColorValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertypublic java.awt.Color getColorValue(java.lang.String propertyName,
java.awt.Color defaultValue)
ICustomPropertyProvidergetColorValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public <T extends java.lang.Enum<T>> T getEnumValue(java.lang.String propertyName,
java.lang.Class<T> enumType)
ICustomPropertyProvidergetEnumValue in interface ICustomPropertyProviderT - the enum type to usepropertyName - the name of the custom propertyenumType - a Class object for <T>public <T extends java.lang.Enum<T>> T getEnumValue(java.lang.String propertyName,
java.lang.Class<T> enumType,
T defaultValue)
ICustomPropertyProvidergetEnumValue in interface ICustomPropertyProviderT - the enum type to usepropertyName - the name of the custom propertyenumType - a Class object for <T>defaultValue - the fallback value in case the property value is null.public java.net.URL getFileValue(java.lang.String propertyName)
ICustomPropertyProvidernull is returned instead.getFileValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertypublic java.net.URL getFileValue(java.lang.String propertyName,
java.net.URL defaultValue)
ICustomPropertyProvidergetFileValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public void setValue(java.lang.String propertyName,
java.net.URL value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String propertyName,
java.lang.String value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String propertyName,
boolean value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String propertyName,
byte value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String propertyName,
short value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String propertyName,
int value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String propertyName,
long value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String propertyName,
float value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String propertyName,
double value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String propertyName,
java.awt.Color value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String propertyName,
java.lang.Enum<?> value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProviderpropertyName - the name of the custom propertyvalue - the new valuepublic void setProperties(java.util.Map<java.lang.String,ICustomProperty> props)
ICustomPropertyProvidersetProperties in interface ICustomPropertyProviderprops - the new list of propertiespublic void removeProperty(java.lang.String propertyName)
removeProperty in interface ICustomPropertyProvider