public class CustomPropertyProvider extends java.lang.Object implements ICustomPropertyProvider, java.io.Serializable
| Constructor and Description |
|---|
CustomPropertyProvider() |
CustomPropertyProvider(CustomPropertyProvider propertyProviderToBeCopied)
Copy Constructor for copying instances of CustomPropertyProviders.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBoolValue(java.lang.String name)
Gets the boolean value of the custom property with the provided name.
|
boolean |
getBoolValue(java.lang.String name,
boolean defaultValue)
Gets the boolean value of the custom property with the provided name.
|
byte |
getByteValue(java.lang.String name)
Gets the byte value of the custom property with the provided name.
|
byte |
getByteValue(java.lang.String name,
byte defaultValue)
Gets the byte value of the custom property with the provided name.
|
java.awt.Color |
getColorValue(java.lang.String name)
Gets the color value of the custom property with the provided name.
|
java.awt.Color |
getColorValue(java.lang.String name,
java.awt.Color defaultValue)
Gets the color value of the custom property with the provided name.
|
double |
getDoubleValue(java.lang.String name)
Gets the double value of the custom property with the provided name.
|
double |
getDoubleValue(java.lang.String name,
double defaultValue)
Gets the double value of the custom property with the provided name.
|
<T extends java.lang.Enum<T>> |
getEnumValue(java.lang.String name,
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 name,
java.lang.Class<T> enumType,
T defaultValue)
Gets the enum value of the custom property with the provided name.
|
float |
getFloatValue(java.lang.String name)
Gets the float value of the custom property with the provided name.
|
float |
getFloatValue(java.lang.String name,
float defaultValue)
Gets the float value of the custom property with the provided name.
|
int |
getIntValue(java.lang.String name)
Gets the int value of the custom property with the provided name.
|
int |
getIntValue(java.lang.String name,
int defaultValue)
Gets the int value of the custom property with the provided name.
|
long |
getLongValue(java.lang.String name)
Gets the long value of the custom property with the provided name.
|
long |
getLongValue(java.lang.String name,
long defaultValue)
Gets the long value of the custom property with the provided name.
|
java.util.List<Property> |
getProperties()
Enumerates the custom properties for this object.
|
short |
getShortValue(java.lang.String name)
Gets the short value of the custom property with the provided name.
|
short |
getShortValue(java.lang.String name,
short defaultValue)
Gets the short value of the custom property with the provided name.
|
java.lang.String |
getStringValue(java.lang.String name)
Gets the string value of the custom property with the provided name.
|
java.lang.String |
getStringValue(java.lang.String name,
java.lang.String defaultValue)
Gets the string value of the custom property with the provided name.
|
boolean |
hasCustomProperty(java.lang.String name)
Checks if a custom property with the given name is present.
|
void |
setProperties(java.util.List<Property> props)
Sets all of the custom properties on this object to the provided values.
|
void |
setValue(java.lang.String name,
boolean value)
Sets the value for the custom property with the given name to the given boolean.
|
void |
setValue(java.lang.String name,
byte value)
Sets the value for the custom property with the given name to the given byte.
|
void |
setValue(java.lang.String name,
java.awt.Color value)
Sets the value for the custom property with the given name to the given color.
|
void |
setValue(java.lang.String name,
double value)
Sets the value for the custom property with the given name to the given double.
|
void |
setValue(java.lang.String name,
java.lang.Enum<?> value)
Sets the value for the custom property with the given name to the given enum.
|
void |
setValue(java.lang.String name,
float value)
Sets the value for the custom property with the given name to the given float.
|
void |
setValue(java.lang.String name,
int value)
Sets the value for the custom property with the given name to the given int.
|
void |
setValue(java.lang.String name,
long value)
Sets the value for the custom property with the given name to the given long.
|
void |
setValue(java.lang.String name,
short value)
Sets the value for the custom property with the given name to the given short.
|
void |
setValue(java.lang.String name,
java.lang.String value)
Sets the value for the custom property with the given name to the given string.
|
public CustomPropertyProvider()
public CustomPropertyProvider(CustomPropertyProvider propertyProviderToBeCopied)
propertyProviderToBeCopied - the PropertyProvider we want to copypublic boolean hasCustomProperty(java.lang.String name)
ICustomPropertyProviderhasCustomProperty in interface ICustomPropertyProvidername - the name of the custom propertypublic java.lang.String getStringValue(java.lang.String name)
ICustomPropertyProvidergetStringValue in interface ICustomPropertyProvidername - the name of the custom propertypublic java.lang.String getStringValue(java.lang.String name,
java.lang.String defaultValue)
ICustomPropertyProvidergetStringValue in interface ICustomPropertyProvidername - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public java.util.List<Property> getProperties()
ICustomPropertyProvidergetProperties in interface ICustomPropertyProviderICustomPropertyProviderpublic void setProperties(java.util.List<Property> props)
ICustomPropertyProvidersetProperties in interface ICustomPropertyProviderprops - the new list of propertiespublic int getIntValue(java.lang.String name)
ICustomPropertyProvidergetIntValue in interface ICustomPropertyProvidername - the name of the custom propertypublic int getIntValue(java.lang.String name,
int defaultValue)
ICustomPropertyProvidergetIntValue in interface ICustomPropertyProvidername - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public short getShortValue(java.lang.String name)
ICustomPropertyProvidergetShortValue in interface ICustomPropertyProvidername - the name of the custom propertypublic short getShortValue(java.lang.String name,
short defaultValue)
ICustomPropertyProvidergetShortValue in interface ICustomPropertyProvidername - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public byte getByteValue(java.lang.String name)
ICustomPropertyProvidergetByteValue in interface ICustomPropertyProvidername - the name of the custom propertypublic byte getByteValue(java.lang.String name,
byte defaultValue)
ICustomPropertyProvidergetByteValue in interface ICustomPropertyProvidername - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public long getLongValue(java.lang.String name)
ICustomPropertyProvidergetLongValue in interface ICustomPropertyProvidername - the name of the custom propertypublic long getLongValue(java.lang.String name,
long defaultValue)
ICustomPropertyProvidergetLongValue in interface ICustomPropertyProvidername - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public boolean getBoolValue(java.lang.String name)
ICustomPropertyProvidergetBoolValue in interface ICustomPropertyProvidername - the name of the custom propertypublic boolean getBoolValue(java.lang.String name,
boolean defaultValue)
ICustomPropertyProvidergetBoolValue in interface ICustomPropertyProvidername - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public float getFloatValue(java.lang.String name)
ICustomPropertyProvidergetFloatValue in interface ICustomPropertyProvidername - the name of the custom propertypublic float getFloatValue(java.lang.String name,
float defaultValue)
ICustomPropertyProvidergetFloatValue in interface ICustomPropertyProvidername - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public double getDoubleValue(java.lang.String name)
ICustomPropertyProvidergetDoubleValue in interface ICustomPropertyProvidername - the name of the custom propertypublic double getDoubleValue(java.lang.String name,
double defaultValue)
ICustomPropertyProvidergetDoubleValue in interface ICustomPropertyProvidername - the name of the custom propertydefaultValue - the fallback value in case the property value is null.public java.awt.Color getColorValue(java.lang.String name)
ICustomPropertyProvidergetColorValue in interface ICustomPropertyProvidername - the name of the custom propertypublic java.awt.Color getColorValue(java.lang.String name,
java.awt.Color defaultValue)
ICustomPropertyProvidergetColorValue in interface ICustomPropertyProvidername - 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 name,
java.lang.Class<T> enumType)
ICustomPropertyProvidergetEnumValue in interface ICustomPropertyProviderT - the enum type to usename - the name of the custom propertyenumType - a Class object for <T>public <T extends java.lang.Enum<T>> T getEnumValue(java.lang.String name,
java.lang.Class<T> enumType,
T defaultValue)
ICustomPropertyProvidergetEnumValue in interface ICustomPropertyProviderT - the enum type to usename - the name of the custom propertyenumType - a Class object for <T>defaultValue - the fallback value in case the property value is null.public void setValue(java.lang.String name,
java.lang.String value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProvidername - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String name,
boolean value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProvidername - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String name,
byte value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProvidername - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String name,
short value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProvidername - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String name,
int value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProvidername - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String name,
long value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProvidername - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String name,
float value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProvidername - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String name,
double value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProvidername - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String name,
java.awt.Color value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProvidername - the name of the custom propertyvalue - the new valuepublic void setValue(java.lang.String name,
java.lang.Enum<?> value)
ICustomPropertyProvidersetValue in interface ICustomPropertyProvidername - the name of the custom propertyvalue - the new value