public interface ICustomPropertyProvider
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.
|
default long |
getLongValue(java.lang.String propertyName)
Gets the long 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.
|
boolean hasCustomProperty(java.lang.String propertyName)
propertyName
- the name of the custom propertyjava.lang.String getTypeOfProperty(java.lang.String propertyName)
void setTypeOfProperty(java.lang.String propertyName, java.lang.String type)
ICustomProperty getProperty(java.lang.String propertyName)
void setValue(java.lang.String propertyName, ICustomProperty value)
void removeProperty(java.lang.String propertyName)
java.lang.String getStringValue(java.lang.String propertyName)
propertyName
- the name of the custom propertyjava.util.NoSuchElementException
- if the custom property does not existjava.lang.String getStringValue(java.lang.String propertyName, java.lang.String defaultValue)
propertyName
- the name of the custom propertydefaultValue
- the fallback value in case the property value is null.int getIntValue(java.lang.String propertyName)
propertyName
- the name of the custom propertyjava.util.NoSuchElementException
- if the custom property does not existjava.lang.NumberFormatException
- if the custom property is not an integer or is not in range for an int
int getIntValue(java.lang.String propertyName, int defaultValue)
propertyName
- the name of the custom propertydefaultValue
- the fallback value in case the property value is null.default long getLongValue(java.lang.String propertyName)
propertyName
- the name of the custom propertyjava.util.NoSuchElementException
- if the custom property does not existjava.lang.NumberFormatException
- if the custom property is not an integer or is not in range for a long
long getLongValue(java.lang.String propertyName, long defaultValue)
propertyName
- the name of the custom propertydefaultValue
- the fallback value in case the property value is null.short getShortValue(java.lang.String propertyName)
propertyName
- the name of the custom propertyjava.util.NoSuchElementException
- if the custom property does not existjava.lang.NumberFormatException
- if the custom property is not an integer or is out of range for a short
short getShortValue(java.lang.String propertyName, short defaultValue)
propertyName
- the name of the custom propertydefaultValue
- the fallback value in case the property value is null.byte getByteValue(java.lang.String propertyName)
propertyName
- the name of the custom propertyjava.util.NoSuchElementException
- if the custom property does not existjava.lang.NumberFormatException
- if the custom property is not an integer or is out of range for a byte
byte getByteValue(java.lang.String propertyName, byte defaultValue)
propertyName
- the name of the custom propertydefaultValue
- the fallback value in case the property value is null.boolean getBoolValue(java.lang.String propertyName)
propertyName
- the name of the custom propertyjava.util.NoSuchElementException
- if the custom property does not existjava.lang.NumberFormatException
- if the custom property is not a boolean
valueboolean getBoolValue(java.lang.String propertyName, boolean defaultValue)
propertyName
- the name of the custom propertydefaultValue
- the fallback value in case the property value is null.float getFloatValue(java.lang.String propertyName)
propertyName
- the name of the custom propertyjava.util.NoSuchElementException
- if the custom property does not existjava.lang.NumberFormatException
- if the custom property is not a numberfloat getFloatValue(java.lang.String propertyName, float defaultValue)
propertyName
- the name of the custom propertydefaultValue
- the fallback value in case the property value is null.double getDoubleValue(java.lang.String propertyName)
propertyName
- the name of the custom propertyjava.util.NoSuchElementException
- if the custom property does not existjava.lang.NumberFormatException
- if the custom property is not a numberdouble getDoubleValue(java.lang.String propertyName, double defaultValue)
propertyName
- the name of the custom propertydefaultValue
- the fallback value in case the property value is null.java.awt.Color getColorValue(java.lang.String propertyName)
propertyName
- the name of the custom propertyjava.util.NoSuchElementException
- if the custom property does not existjava.awt.Color getColorValue(java.lang.String propertyName, java.awt.Color defaultValue)
propertyName
- the name of the custom propertydefaultValue
- the fallback value in case the property value is null.<T extends java.lang.Enum<T>> T getEnumValue(java.lang.String propertyName, java.lang.Class<T> enumType)
T
- the enum type to usepropertyName
- the name of the custom propertyenumType
- a Class
object for <T>
java.util.NoSuchElementException
- if the custom property does not exist<T extends java.lang.Enum<T>> T getEnumValue(java.lang.String propertyName, java.lang.Class<T> enumType, T defaultValue)
T
- the enum type to usepropertyName
- the name of the custom propertydefaultValue
- the fallback value in case the property value is null.enumType
- a Class
object for <T>
java.net.URL getFileValue(java.lang.String propertyName)
null
is returned instead.propertyName
- the name of the custom propertyjava.net.URL getFileValue(java.lang.String propertyName, java.net.URL defaultValue)
propertyName
- the name of the custom propertydefaultValue
- the fallback value in case the property value is null.void setValue(java.lang.String propertyName, java.net.URL value)
propertyName
- the name of the custom propertyvalue
- the new valuevoid setValue(java.lang.String propertyName, java.lang.String value)
propertyName
- the name of the custom propertyvalue
- the new valuevoid setValue(java.lang.String propertyName, boolean value)
propertyName
- the name of the custom propertyvalue
- the new valuevoid setValue(java.lang.String propertyName, byte value)
propertyName
- the name of the custom propertyvalue
- the new valuevoid setValue(java.lang.String propertyName, short value)
propertyName
- the name of the custom propertyvalue
- the new valuevoid setValue(java.lang.String propertyName, int value)
propertyName
- the name of the custom propertyvalue
- the new valuevoid setValue(java.lang.String propertyName, long value)
propertyName
- the name of the custom propertyvalue
- the new valuevoid setValue(java.lang.String propertyName, float value)
propertyName
- the name of the custom propertyvalue
- the new valuevoid setValue(java.lang.String propertyName, double value)
propertyName
- the name of the custom propertyvalue
- the new valuevoid setValue(java.lang.String propertyName, java.awt.Color value)
propertyName
- the name of the custom propertyvalue
- the new valuevoid setValue(java.lang.String propertyName, java.lang.Enum<?> value)
propertyName
- the name of the custom propertyvalue
- the new valuejava.util.Map<java.lang.String,ICustomProperty> getProperties()
Map
view of the custom properties for this ICustomPropertyProvider
.Map
view of the custom properties for this ICustomPropertyProvider
void setProperties(java.util.Map<java.lang.String,ICustomProperty> props)
props
- the new list of properties